[packages/gdb] up to 11.1

atler atler at pld-linux.org
Mon Nov 15 01:58:19 CET 2021


commit 1d2a824d36aa62f22847c52fab8249be5a536a0c
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Nov 15 01:55:53 2021 +0100

    up to 11.1
    
    - remove patches which came from fedora but were dropped there since

 gdb-6.6-buildid-locate-core-as-arg.patch       |  196 --
 gdb-6.6-buildid-locate-rpm.patch               |   24 +-
 gdb-6.6-buildid-locate-solib-missing-ids.patch |   13 +-
 gdb-6.6-buildid-locate.patch                   |   87 +-
 gdb-archer-vla-tests.patch                     | 3771 ------------------------
 gdb-passflags.patch                            |   21 -
 gdb-readline.patch                             |    8 +-
 gdb-vla-intel-fortran-strides.patch            | 1778 -----------
 gdb.spec                                       |   14 +-
 glibc2.34.patch                                |  107 +
 10 files changed, 175 insertions(+), 5844 deletions(-)
---
diff --git a/gdb.spec b/gdb.spec
index 559e9fa..4cbdde5 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -21,26 +21,24 @@ Summary(uk.UTF-8):	Символьний відладчик для С та інш
 Summary(zh_CN.UTF-8):	[开发]C和其他语言的调试器
 Summary(zh_TW.UTF-8):	[.-A開發]C和.$)B其.-A他語.$)B言的調試器
 Name:		gdb
-Version:	10.2
+Version:	11.1
 Release:	1
 License:	GPL v3+
 Group:		Development/Debuggers
 Source0:	https://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
-# Source0-md5:	c044b7146903ec51c9d2337a29aee93b
+# Source0-md5:	257cb0f67927f79acf636d8c01e19990
 Source1:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5:	2e8a48939ae282c12bbacdd54e398247
 Source3:	%{name}-gstack.man
+Patch0:		glibc2.34.patch
 Patch100:	gdb-6.6-buildid-locate.patch
 Patch101:	gdb-6.6-buildid-locate-solib-missing-ids.patch
 Patch102:	gdb-6.6-buildid-locate-rpm.patch
-Patch103:	gdb-6.6-buildid-locate-core-as-arg.patch
 Patch104:	gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
 Patch105:	gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
 Patch106:	gdb-6.6-buildid-locate-rpm-scl.patch
 Patch110:	gdb-6.3-gstack-20050411.patch
 
-Patch112:	gdb-archer-vla-tests.patch
-Patch113:	gdb-vla-intel-fortran-strides.patch
 Patch114:	gdb-vla-intel-stringbt-fix.patch
 Patch115:	gdb-vla-intel-tests.patch
 Patch1000:	%{name}-readline.patch
@@ -193,17 +191,15 @@ GDB w postaci biblioteki statycznej.
 %{__rm} gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
 %{__rm} gdb/m2-exp.c gdb/p-exp.c
 
+%patch0 -p1
 %patch100 -p1
 %patch101 -p1
 %patch102 -p1
-%patch103 -p1
 %patch104 -p1
 %patch105 -p1
 %patch106 -p1
 %patch110 -p1
 
-%patch112 -p1
-%patch113 -p1
 %patch114 -p1
 %patch115 -p1
 
@@ -331,7 +327,7 @@ cp -p build/libdecnumber/libdecnumber.a $RPM_BUILD_ROOT%{_libdir}
 # These are part of binutils:
 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/{bfd,opcodes}.mo
 %{__rm} $RPM_BUILD_ROOT%{_infodir}/bfd.info*
-%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfd_stdint,bfdlink,diagnostics,dis-asm,symcat,plugin-api}.h
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfdlink,diagnostics,dis-asm,symcat,plugin-api}.h
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.a
 
diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch
deleted file mode 100644
index 45b915d..0000000
--- a/gdb-6.6-buildid-locate-core-as-arg.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Fedora GDB patches <invalid at email.com>
-Date: Fri, 27 Oct 2017 21:07:50 +0200
-Subject: gdb-6.6-buildid-locate-core-as-arg.patch
-
-;;=push+jan
-
-http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
-
-[ Fixed up since the mail.  ]
-
-On Thu, 21 Jan 2010 18:17:15 +0100, Doug Evans wrote:
-> Not an exhaustive list, but if we go down the path of converting "gdb
-> corefile" to "gdb -c corefile", then we also need to think about "file
-> corefile" being converted to "core corefile" [or "target core
-> corefile", "core" is apparently deprecated in favor of "target core"]
-> and "target exec corefile" -> "target core corefile".  Presumably
-> "file corefile" (and "target exec corefile") would discard the
-> currently selected executable.  But maybe not.  Will that be confusing
-> for users?  I don't know.
-
-While thinking about it overriding some GDB _commands_ was not my intention.
-
-There is a general assumption if I have a shell COMMAND and some FILE I can do
-$ COMMAND FILE
-and COMMAND will appropriately load the FILE.
-
-FSF GDB currently needs to specify also the executable file for core files
-which already inhibits this intuitive expectation.  OTOH with the build-id
-locating patch which could allow such intuitive start  notneeding the
-executable file.  Still it currently did not work due to the required "-c":
-$ COMMAND -c COREFILE
-
-Entering "file", "core-file" or "attach" commands is already explicit enough
-so that it IMO should do what the command name says without any
-autodetections.  The second command line argument
-(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
-neither "attach" accepts a core file nor "core-file" accepts a PID.
-
-The patch makes sense only with the build-id patchset so this is not submit
-for FSF GDB inclusion yet.  I am fine with your patch (+/- Hui Zhu's pending
-bfd_check_format_matches) as the patch below is its natural extension.
-
-Sorry for the delay,
-Jan
-
-2010-01-25  Jan Kratochvil  <jan.kratochvil at redhat.com>
-
-	* exceptions.h (enum errors <IS_CORE_ERROR>): New.
-	* exec.c: Include exceptions.h.
-	(exec_file_attach <bfd_core>): Call throw_error (IS_CORE_ERROR, ...).
-	* main.c (exec_or_core_file_attach): New.
-	(captured_main <optind < argc>): Set also corearg.
-	(captured_main <strcmp (execarg, symarg) == 0>): New variable func.
-	Call exec_or_core_file_attach if COREARG matches EXECARG.  Call
-	symbol_file_add_main only if CORE_BFD remained NULL.
-
-Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
-2010-01-20  Doug Evans  <dje at google.com>
-
-	* exec.c (exec_file_attach): Print a more useful error message if the
-	user did "gdb core".
-
-diff --git a/gdb/exec.c b/gdb/exec.c
---- a/gdb/exec.c
-+++ b/gdb/exec.c
-@@ -18,6 +18,8 @@
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
- 
- #include "defs.h"
-+#include "arch-utils.h"
-+#include "exceptions.h"
- #include "frame.h"
- #include "inferior.h"
- #include "target.h"
-@@ -495,12 +497,27 @@ exec_file_attach (const char *filename, int from_tty)
- 
-       if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
- 	{
-+	  int is_core;
-+
-+	  /* If the user accidentally did "gdb core", print a useful
-+	     error message.  Check it only after bfd_object has been checked as
-+	     a valid executable may get recognized for example also as
-+	     "trad-core".  */
-+	  is_core = bfd_check_format (exec_bfd, bfd_core);
-+
- 	  /* Make sure to close exec_bfd, or else "run" might try to use
- 	     it.  */
- 	  exec_close ();
--	  error (_("\"%ps\": not in executable format: %s"),
--		 styled_string (file_name_style.style (), scratch_pathname),
--		 gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
-+
-+	  if (is_core != 0)
-+	    throw_error (IS_CORE_ERROR,
-+			 _("\"%s\" is a core file.\n"
-+			   "Please specify an executable to debug."),
-+			 scratch_pathname);
-+	  else
-+	    error (_("\"%ps\": not in executable format: %s"),
-+		   styled_string (file_name_style.style (), scratch_pathname),
-+		   gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
- 	}
- 
-       if (build_section_table (exec_bfd, &sections, &sections_end))
-diff --git a/gdb/main.c b/gdb/main.c
---- a/gdb/main.c
-+++ b/gdb/main.c
-@@ -524,6 +524,34 @@ struct cmdarg
-   char *string;
- };
- 
-+/* Call exec_file_attach.  If it detected FILENAME is a core file call
-+   core_file_command.  Print the original exec_file_attach error only if
-+   core_file_command failed to find a matching executable.  */
-+
-+static void
-+exec_or_core_file_attach (const char *filename, int from_tty)
-+{
-+  gdb_assert (exec_bfd == NULL);
-+
-+  try
-+    {
-+      exec_file_attach (filename, from_tty);
-+    }
-+  catch (gdb_exception_error &e)
-+    {
-+      if (e.error == IS_CORE_ERROR)
-+	{
-+	  core_file_command ((char *) filename, from_tty);
-+
-+	  /* Iff the core file found its executable suppress the error message
-+	     from exec_file_attach.  */
-+	  if (exec_bfd != NULL)
-+	    return;
-+	}
-+      throw_exception (std::move (e));
-+    }
-+}
-+
- static void
- captured_main_1 (struct captured_main_args *context)
- {
-@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
- 	{
- 	  symarg = argv[optind];
- 	  execarg = argv[optind];
-+	  if (optind + 1 == argc && corearg == NULL)
-+	    corearg = argv[optind];
- 	  optind++;
- 	}
- 
-@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
-       && symarg != NULL
-       && strcmp (execarg, symarg) == 0)
-     {
-+      catch_command_errors_const_ftype *func;
-+
-+      /* Call exec_or_core_file_attach only if the file was specified as
-+	 a command line argument (and not an a command line option).  */
-+      if (corearg != NULL && strcmp (corearg, execarg) == 0)
-+	{
-+	  func = exec_or_core_file_attach;
-+	  corearg = NULL;
-+	}
-+      else
-+	func = exec_file_attach;
-+
-       /* The exec file and the symbol-file are the same.  If we can't
-          open it, better only print one error message.
--         catch_command_errors returns non-zero on success!  */
--      ret = catch_command_errors (exec_file_attach, execarg,
--				  !batch_flag);
--      if (ret != 0)
-+         catch_command_errors returns non-zero on success!
-+	 Do not load EXECARG as a symbol file if it has been already processed
-+	 as a core file.  */
-+      ret = catch_command_errors (func, execarg, !batch_flag);
-+      if (ret != 0 && core_bfd == NULL)
- 	ret = catch_command_errors (symbol_file_add_main_adapter,
- 				    symarg, !batch_flag);
-     }
-diff --git a/gdbsupport/common-exceptions.h b/gdbsupport/common-exceptions.h
---- a/gdbsupport/common-exceptions.h
-+++ b/gdbsupport/common-exceptions.h
-@@ -106,6 +106,9 @@ enum errors {
-      "_ERROR" is appended to the name.  */
-   MAX_COMPLETIONS_REACHED_ERROR,
- 
-+  /* Attempt to load a core file as executable.  */
-+  IS_CORE_ERROR,
-+
-   /* Add more errors here.  */
-   NR_ERRORS
- };
diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch
index bf783da..4693f43 100644
--- a/gdb-6.6-buildid-locate-rpm.patch
+++ b/gdb-6.6-buildid-locate-rpm.patch
@@ -696,7 +696,7 @@ diff --git a/gdb/config.in b/gdb/config.in
  /* Define to 1 if translation of program messages to the user's native
     language is requested. */
  #undef ENABLE_NLS
-@@ -247,6 +250,9 @@
+@@ -246,6 +249,9 @@
  /* Define if you have the mpfr library. */
  #undef HAVE_LIBMPFR
  
@@ -709,7 +709,7 @@ diff --git a/gdb/config.in b/gdb/config.in
 diff --git a/gdb/configure b/gdb/configure
 --- a/gdb/configure
 +++ b/gdb/configure
-@@ -769,6 +769,11 @@ PKG_CONFIG
+@@ -771,6 +771,11 @@ PKG_CONFIG
  HAVE_NATIVE_GCORE_TARGET
  TARGET_OBS
  subdirs
@@ -721,7 +721,7 @@ diff --git a/gdb/configure b/gdb/configure
  GDB_DATADIR
  DEBUGDIR
  MAKEINFO_EXTRA_FLAGS
-@@ -873,6 +878,7 @@ with_gdb_datadir
+@@ -876,6 +881,7 @@ with_gdb_datadir
  with_relocated_sources
  with_auto_load_dir
  with_auto_load_safe_path
@@ -729,7 +729,7 @@ diff --git a/gdb/configure b/gdb/configure
  enable_targets
  enable_64_bit_bfd
  enable_gdbmi
-@@ -949,6 +955,8 @@ PKG_CONFIG_PATH
+@@ -953,6 +959,8 @@ PKG_CONFIG_PATH
  PKG_CONFIG_LIBDIR
  DEBUGINFOD_CFLAGS
  DEBUGINFOD_LIBS
@@ -738,7 +738,7 @@ diff --git a/gdb/configure b/gdb/configure
  YACC
  YFLAGS
  XMKMF'
-@@ -1621,6 +1629,8 @@ Optional Packages:
+@@ -1625,6 +1633,8 @@ Optional Packages:
                            do not restrict auto-loaded files locations
    --with-debuginfod       Enable debuginfo lookups with debuginfod
                            (auto/yes/no)
@@ -747,7 +747,7 @@ diff --git a/gdb/configure b/gdb/configure
    --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
    --with-curses           use the curses library instead of the termcap
                            library
-@@ -1702,6 +1712,8 @@ Some influential environment variables:
+@@ -1705,6 +1715,8 @@ Some influential environment variables:
                C compiler flags for DEBUGINFOD, overriding pkg-config
    DEBUGINFOD_LIBS
                linker flags for DEBUGINFOD, overriding pkg-config
@@ -756,7 +756,7 @@ diff --git a/gdb/configure b/gdb/configure
    YACC        The `Yet Another Compiler Compiler' implementation to use.
                Defaults to the first program found out of: `bison -y', `byacc',
                `yacc'.
-@@ -6666,6 +6678,494 @@ _ACEOF
+@@ -6616,6 +6628,494 @@ _ACEOF
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
  $as_echo "$with_auto_load_safe_path" >&6; }
  
@@ -1254,7 +1254,7 @@ diff --git a/gdb/configure b/gdb/configure
 diff --git a/gdb/configure.ac b/gdb/configure.ac
 --- a/gdb/configure.ac
 +++ b/gdb/configure.ac
-@@ -143,6 +143,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
+@@ -153,6 +153,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
  	      [Directories safe to hold auto-loaded files.])
  AC_MSG_RESULT([$with_auto_load_safe_path])
  
@@ -1457,7 +1457,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
 diff --git a/gdb/event-top.c b/gdb/event-top.c
 --- a/gdb/event-top.c
 +++ b/gdb/event-top.c
-@@ -42,6 +42,7 @@
+@@ -41,6 +41,7 @@
  #include "gdbsupport/gdb_select.h"
  #include "gdbsupport/gdb-sigmask.h"
  #include "async-event.h"
@@ -1465,7 +1465,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
  
  /* readline include files.  */
  #include "readline/readline.h"
-@@ -364,6 +365,8 @@ display_gdb_prompt (const char *new_prompt)
+@@ -363,6 +364,8 @@ display_gdb_prompt (const char *new_prompt)
    /* Reset the nesting depth used when trace-commands is set.  */
    reset_command_nest_depth ();
  
@@ -1489,11 +1489,11 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
 diff --git a/gdb/symfile.h b/gdb/symfile.h
 --- a/gdb/symfile.h
 +++ b/gdb/symfile.h
-@@ -560,6 +560,7 @@ extern void generic_load (const char *args, int from_tty);
+@@ -342,6 +342,7 @@ extern void generic_load (const char *args, int from_tty);
  /* build-id support.  */
  extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
  extern void debug_print_missing (const char *binary, const char *debug);
 +extern void debug_flush_missing (void);
  #define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
  
- /* From dwarf2read.c */
+ /* From minidebug.c.  */
diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch
index f1f5e83..7dd4fb1 100644
--- a/gdb-6.6-buildid-locate-solib-missing-ids.patch
+++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch
@@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862
 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
 --- a/gdb/solib-svr4.c
 +++ b/gdb/solib-svr4.c
-@@ -1340,14 +1340,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
+@@ -1350,14 +1350,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
  	}
  
        {
@@ -38,13 +38,14 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
 +	   not do any build-id checking of the libraries.  There may be missing
 +	   build-ids dumped in the core file and we would map all the libraries
 +	   to the only existing file loaded that time - the executable.  */
-+	if (symfile_objfile != NULL
-+	    && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
++	if (current_program_space->symfile_object_file != NULL
++	    && (current_program_space->symfile_object_file->flags
++	         & OBJF_BUILD_ID_CORE_LOADED) != 0)
 +	  build_id = build_id_addr_get (li->l_ld);
  	if (build_id != NULL)
  	  {
  	    char *name, *build_id_filename;
-@@ -1362,23 +1375,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
+@@ -1372,23 +1386,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
  		xfree (name);
  	      }
  	    else
@@ -60,8 +61,8 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
 -		   instead) if the on-disk files no longer match the
 -		   running program version.  */
 -
--		if (symfile_objfile != NULL
--		    && (symfile_objfile->flags
+-		if (current_program_space->symfile_object_file != NULL
+-		    && (current_program_space->symfile_object_file->flags
 -			& OBJF_BUILD_ID_CORE_LOADED) != 0)
 -		  newobj->so_name[0] = 0;
 -	      }
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index 90f714b..a463e37 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate.patch
 diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
 --- a/bfd/libbfd-in.h
 +++ b/bfd/libbfd-in.h
-@@ -121,7 +121,7 @@ static inline char *
+@@ -115,7 +115,7 @@ static inline char *
  bfd_strdup (const char *str)
  {
    size_t len = strlen (str) + 1;
@@ -21,7 +21,7 @@ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
 diff --git a/bfd/libbfd.h b/bfd/libbfd.h
 --- a/bfd/libbfd.h
 +++ b/bfd/libbfd.h
-@@ -126,7 +126,7 @@ static inline char *
+@@ -120,7 +120,7 @@ static inline char *
  bfd_strdup (const char *str)
  {
    size_t len = strlen (str) + 1;
@@ -890,7 +890,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 +      char *build_id_filename_cstr = NULL;
        gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
 -						   build_id->data));
-+						    build_id->data,
++						   build_id->data,
 +	      (!build_id_filename_return ? NULL : &build_id_filename_cstr)));
 +      if (build_id_filename_return)
 +	{
@@ -906,7 +906,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
        /* Prevent looping on a stripped .debug file.  */
        if (abfd != NULL
  	  && filename_cmp (bfd_get_filename (abfd.get ()),
-@@ -223,3 +897,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
+@@ -223,3 +897,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
  
    return std::string ();
  }
@@ -926,7 +926,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 +			    show_build_id_verbose,
 +			    &setlist, &showlist);
 +
-+  gdb::observers::executable_changed.attach (debug_print_executable_changed);
++  gdb::observers::executable_changed.attach (debug_print_executable_changed,
++                                             "build-id");
 +}
 diff --git a/gdb/build-id.h b/gdb/build-id.h
 --- a/gdb/build-id.h
@@ -950,7 +951,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
  extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
 -					      const bfd_byte *build_id);
 +					      const bfd_byte *build_id,
-+					      char **link_return);
++					      char **link_return = NULL);
 +
 +extern char *build_id_to_filename (const struct bfd_build_id *build_id,
 +				   char **link_return);
@@ -978,9 +979,9 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
 diff --git a/gdb/coffread.c b/gdb/coffread.c
 --- a/gdb/coffread.c
 +++ b/gdb/coffread.c
-@@ -709,7 +709,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
+@@ -710,7 +710,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
    /* Try to add separate debug file if no symbols table found.   */
-   if (!objfile_has_partial_symbols (objfile))
+   if (!objfile->has_partial_symbols ())
      {
 -      std::string debugfile = find_separate_debug_file_by_buildid (objfile);
 +      std::string debugfile = find_separate_debug_file_by_buildid (objfile,
@@ -1002,7 +1003,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
  #include "inferior.h"
  #include "infrun.h"
  #include "symtab.h"
-@@ -362,6 +366,8 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
+@@ -356,6 +360,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
      switch_to_thread (thr);			/* Yes, make it current.  */
  }
  
@@ -1011,7 +1012,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
  /* Issue a message saying we have no core to debug, if FROM_TTY.  */
  
  static void
-@@ -398,19 +404,25 @@ core_file_command (const char *filename, int from_tty)
+@@ -392,19 +398,26 @@ core_file_command (const char *filename, int from_tty)
  static void
  locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
  {
@@ -1031,16 +1032,17 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
        exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty);
        symbol_file_add_main (bfd_get_filename (execbfd.get ()),
  			    symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0));
-+      if (symfile_objfile != NULL)
-+	symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
++      if (current_program_space->symfile_object_file != NULL)
++	current_program_space->symfile_object_file->flags |=
++	  OBJF_BUILD_ID_CORE_LOADED;
      }
 +  else
 +    debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
  }
  
  /* See gdbcore.h.  */
-@@ -1189,4 +1201,11 @@ _initialize_corelow ()
-            maintenance_print_core_file_backed_mappings,
+@@ -1209,4 +1222,11 @@ _initialize_corelow ()
+ 	   maintenance_print_core_file_backed_mappings,
  	   _("Print core file's file-backed mappings."),
  	   &maintenanceprintlist);
 +
@@ -1054,7 +1056,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
 --- a/gdb/doc/gdb.texinfo
 +++ b/gdb/doc/gdb.texinfo
-@@ -21074,6 +21074,27 @@ information files.
+@@ -21415,6 +21415,27 @@ information files.
  
  @end table
  
@@ -1107,16 +1109,7 @@ diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
 diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
 --- a/gdb/dwarf2/read.c
 +++ b/gdb/dwarf2/read.c
-@@ -2215,7 +2215,7 @@ dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd)
-     }
- 
-   if (dwz_bfd == NULL)
--    dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid);
-+    dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL);
- 
-   if (dwz_bfd == nullptr)
-     {
-@@ -5977,7 +5977,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
+@@ -5447,7 +5447,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
  static gdb::array_view<const gdb_byte>
  get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
  {
@@ -1125,7 +1118,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
    if (build_id == nullptr)
      return {};
  
-@@ -5990,7 +5990,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
+@@ -5460,7 +5460,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
  static gdb::array_view<const gdb_byte>
  get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
  {
@@ -1137,7 +1130,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
 diff --git a/gdb/elfread.c b/gdb/elfread.c
 --- a/gdb/elfread.c
 +++ b/gdb/elfread.c
-@@ -1298,7 +1298,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
+@@ -1272,7 +1272,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
  	   && objfile->separate_debug_objfile == NULL
  	   && objfile->separate_debug_objfile_backlink == NULL)
      {
@@ -1148,7 +1141,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
  
        if (debugfile.empty ())
  	debugfile = find_separate_debug_file_by_debuglink (objfile);
-@@ -1313,7 +1315,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
+@@ -1287,7 +1289,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
        else
  	{
  	  has_dwarf2 = false;
@@ -1157,7 +1150,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
  
  	  if (build_id != nullptr)
  	    {
-@@ -1338,6 +1340,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
+@@ -1312,6 +1314,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
  		      has_dwarf2 = true;
  		    }
  		}
@@ -1171,16 +1164,16 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
 diff --git a/gdb/exec.c b/gdb/exec.c
 --- a/gdb/exec.c
 +++ b/gdb/exec.c
-@@ -264,7 +264,7 @@ validate_exec_file (int from_tty)
-   reopen_exec_file ();
+@@ -237,7 +237,7 @@ validate_exec_file (int from_tty)
    current_exec_file = get_exec_file (0);
  
--  const bfd_build_id *exec_file_build_id = build_id_bfd_get (exec_bfd);
-+  const bfd_build_id *exec_file_build_id = build_id_bfd_shdr_get (exec_bfd);
+   const bfd_build_id *exec_file_build_id
+-    = build_id_bfd_get (current_program_space->exec_bfd ());
++    = build_id_bfd_shdr_get (current_program_space->exec_bfd ());
    if (exec_file_build_id != nullptr)
      {
        /* Prepend the target prefix, to force gdb_bfd_open to open the
-@@ -277,7 +277,7 @@ validate_exec_file (int from_tty)
+@@ -250,7 +250,7 @@ validate_exec_file (int from_tty)
        if (abfd != nullptr)
  	{
  	  const bfd_build_id *target_exec_file_build_id
@@ -1192,7 +1185,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
 diff --git a/gdb/objfiles.h b/gdb/objfiles.h
 --- a/gdb/objfiles.h
 +++ b/gdb/objfiles.h
-@@ -714,6 +714,10 @@ struct objfile
+@@ -812,6 +812,10 @@ struct objfile
    bool skip_jit_symbol_lookup = false;
  };
  
@@ -1235,7 +1228,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
  
  static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
  static int svr4_have_link_map_offsets (void);
-@@ -1338,9 +1339,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
+@@ -1348,9 +1349,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
  	  continue;
  	}
  
@@ -1277,8 +1270,8 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
 +		   instead) if the on-disk files no longer match the
 +		   running program version.  */
 +
-+		if (symfile_objfile != NULL
-+		    && (symfile_objfile->flags
++		if (current_program_space->symfile_object_file != NULL
++		    && (current_program_space->symfile_object_file->flags
 +			& OBJF_BUILD_ID_CORE_LOADED) != 0)
 +		  newobj->so_name[0] = 0;
 +	      }
@@ -1293,7 +1286,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
 diff --git a/gdb/source.c b/gdb/source.c
 --- a/gdb/source.c
 +++ b/gdb/source.c
-@@ -1165,7 +1165,7 @@ open_source_file (struct symtab *s)
+@@ -1178,7 +1178,7 @@ open_source_file (struct symtab *s)
  	      srcpath += s->filename;
  	    }
  
@@ -1305,9 +1298,9 @@ diff --git a/gdb/source.c b/gdb/source.c
 diff --git a/gdb/symfile.h b/gdb/symfile.h
 --- a/gdb/symfile.h
 +++ b/gdb/symfile.h
-@@ -550,12 +550,18 @@ void expand_symtabs_matching
- void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
- 			   int need_fullname);
+@@ -332,12 +332,18 @@ bool expand_symtabs_matching
+ void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
+ 			   bool need_fullname);
  
 +
  /* Target-agnostic function to load the sections of an executable into memory.
@@ -1321,9 +1314,9 @@ diff --git a/gdb/symfile.h b/gdb/symfile.h
 +extern void debug_print_missing (const char *binary, const char *debug);
 +#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
 +
- /* From dwarf2read.c */
+ /* From minidebug.c.  */
  
- /* Names for a dwarf2 debugging section.  The field NORMAL is the normal
+ extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *);
 diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
 --- a/gdb/testsuite/gdb.base/corefile.exp
 +++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -1364,7 +1357,7 @@ diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefi
 diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp
 --- a/gdb/testsuite/gdb.base/gdbinit-history.exp
 +++ b/gdb/testsuite/gdb.base/gdbinit-history.exp
-@@ -181,7 +181,8 @@ proc test_empty_history_filename { } {
+@@ -185,7 +185,8 @@ proc test_empty_history_filename { } {
      global env
      global gdb_prompt
  
@@ -1388,7 +1381,7 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb
 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
 --- a/gdb/testsuite/lib/gdb.exp
 +++ b/gdb/testsuite/lib/gdb.exp
-@@ -2011,6 +2011,17 @@ proc default_gdb_start { } {
+@@ -2130,6 +2130,17 @@ proc default_gdb_start { } {
  	}
      }
  
@@ -1409,7 +1402,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
 diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
 --- a/gdb/testsuite/lib/mi-support.exp
 +++ b/gdb/testsuite/lib/mi-support.exp
-@@ -308,6 +308,16 @@ proc default_mi_gdb_start { args } {
+@@ -322,6 +322,16 @@ proc default_mi_gdb_start { args } {
  	    warning "Couldn't set the width to 0."
  	}
      }
diff --git a/gdb-archer-vla-tests.patch b/gdb-archer-vla-tests.patch
deleted file mode 100644
index f07183c..0000000
--- a/gdb-archer-vla-tests.patch
+++ /dev/null
@@ -1,3771 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Fedora GDB patches <invalid at email.com>
-Date: Fri, 27 Oct 2017 21:07:50 +0200
-Subject: gdb-archer-vla-tests.patch
-
-;;=fedoratest
-
-diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
---- a/gdb/testsuite/gdb.ada/packed_array.exp
-+++ b/gdb/testsuite/gdb.ada/packed_array.exp
-@@ -53,5 +53,11 @@ gdb_test_multiple "$test" "$test" {
-         # are.  Observed with (FSF GNU Ada 4.5.3 20110124).
-         xfail $test
-     }
-+    -re "= \\(\\)\[\r\n\]+$gdb_prompt $" {
-+	# archer-jankratochvil-vla resolves it as a dynamic type resolved as an
-+	# empty array [0..-1].
-+	# DW_AT_upper_bound : (DW_OP_fbreg: -48; DW_OP_deref)
-+        xfail $test
-+    }
- }
- 
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
-@@ -0,0 +1,358 @@
-+	.file	"x86_64-vla-pointer.c"
-+	.text
-+.Ltext0:
-+	.globl	foo
-+	.type	foo, @function
-+foo:
-+.LFB0:
-+	.file 1 "gdb.arch/x86_64-vla-pointer.c"
-+	# gdb.arch/x86_64-vla-pointer.c:22
-+	.loc 1 22 0
-+	.cfi_startproc
-+# BLOCK 2 seq:0
-+# PRED: ENTRY (FALLTHRU)
-+	pushq	%rbp
-+	.cfi_def_cfa_offset 16
-+	.cfi_offset 6, -16
-+	movq	%rsp, %rbp
-+	.cfi_def_cfa_register 6
-+	pushq	%rbx
-+	subq	$56, %rsp
-+	.cfi_offset 3, -24
-+	movl	%edi, -52(%rbp)
-+	# gdb.arch/x86_64-vla-pointer.c:22
-+	.loc 1 22 0
-+	movq	%rsp, %rax
-+	movq	%rax, %rsi
-+	# gdb.arch/x86_64-vla-pointer.c:23
-+	.loc 1 23 0
-+	movl	-52(%rbp), %eax
-+	movslq	%eax, %rdx
-+	subq	$1, %rdx
-+	movq	%rdx, -32(%rbp)
-+	movslq	%eax, %rdx
-+	movq	%rdx, %r8
-+	movl	$0, %r9d
-+	# gdb.arch/x86_64-vla-pointer.c:24
-+	.loc 1 24 0
-+	movslq	%eax, %rdx
-+	movq	%rdx, %rcx
-+	movl	$0, %ebx
-+	cltq
-+	movl	$16, %edx
-+	subq	$1, %rdx
-+	addq	%rdx, %rax
-+	movl	$16, %ebx
-+	movl	$0, %edx
-+	divq	%rbx
-+	imulq	$16, %rax, %rax
-+	subq	%rax, %rsp
-+	movq	%rsp, %rax
-+	addq	$0, %rax
-+	movq	%rax, -40(%rbp)
-+	# gdb.arch/x86_64-vla-pointer.c:27
-+	.loc 1 27 0
-+	movl	$0, -20(%rbp)
-+# SUCC: 4 [100.0%]
-+	jmp	.L2
-+# BLOCK 3 seq:1
-+# PRED: 4
-+.L3:
-+	# gdb.arch/x86_64-vla-pointer.c:28
-+	.loc 1 28 0 discriminator 3
-+	movl	-20(%rbp), %eax
-+	movl	%eax, %ecx
-+	movq	-40(%rbp), %rdx
-+	movl	-20(%rbp), %eax
-+	cltq
-+	movb	%cl, (%rdx,%rax)
-+# SUCC: 4 (FALLTHRU,DFS_BACK)
-+	# gdb.arch/x86_64-vla-pointer.c:27
-+	.loc 1 27 0 discriminator 3
-+	addl	$1, -20(%rbp)
-+# BLOCK 4 seq:2
-+# PRED: 3 (FALLTHRU,DFS_BACK) 2 [100.0%]
-+.L2:
-+	# gdb.arch/x86_64-vla-pointer.c:27
-+	.loc 1 27 0 is_stmt 0 discriminator 1
-+	movl	-20(%rbp), %eax
-+	cmpl	-52(%rbp), %eax
-+# SUCC: 3 5 (FALLTHRU)
-+	jl	.L3
-+# BLOCK 5 seq:3
-+# PRED: 4 (FALLTHRU)
-+	# gdb.arch/x86_64-vla-pointer.c:30
-+	.loc 1 30 0 is_stmt 1
-+	movq	-40(%rbp), %rax
-+	movb	$0, (%rax)
-+	movq	%rsi, %rsp
-+	# gdb.arch/x86_64-vla-pointer.c:31
-+	.loc 1 31 0
-+	nop
-+	movq	-8(%rbp), %rbx
-+	leave
-+	.cfi_def_cfa 7, 8
-+# SUCC: EXIT [100.0%]
-+	ret
-+	.cfi_endproc
-+.LFE0:
-+	.size	foo, .-foo
-+.Letext0:
-+	.section	.debug_info,"", at progbits
-+.Ldebug_info0:
-+	.long	0xa5	# 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	.LASF3	# DW_AT_producer: "GNU C11 6.2.1 20160916 (Red Hat 6.2.1-2) -mtune=generic -march=x86-64 -g"
-+	.byte	0xc	# DW_AT_language
-+	.long	.LASF4	# DW_AT_name: "gdb.arch/x86_64-vla-pointer.c"
-+	.long	.LASF5	# DW_AT_comp_dir: "/home/jkratoch/redhat/fedora/gdb/master/gdb-7.12/gdb/testsuite"
-+	.quad	.Ltext0	# DW_AT_low_pc
-+	.quad	.Letext0-.Ltext0	# DW_AT_high_pc
-+	.long	.Ldebug_line0	# DW_AT_stmt_list
-+	.uleb128 0x2	# (DIE (0x2d) DW_TAG_subprogram)
-+			# DW_AT_external
-+	.ascii "foo\0"	# DW_AT_name
-+	.byte	0x1	# DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
-+	.byte	0x15	# DW_AT_decl_line
-+			# DW_AT_prototyped
-+	.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
-+	.long	0x80	# DW_AT_sibling
-+	.uleb128 0x3	# (DIE (0x4a) DW_TAG_formal_parameter)
-+	.long	.LASF6	# DW_AT_name: "size"
-+	.byte	0x1	# DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
-+	.byte	0x15	# DW_AT_decl_line
-+	.long	0x80	# DW_AT_type
-+	.uleb128 0x3	# DW_AT_location
-+	.byte	0x91	# DW_OP_fbreg
-+	.sleb128 -68
-+	.uleb128 0x4	# (DIE (0x59) DW_TAG_typedef)
-+	.long	.LASF7	# DW_AT_name: "array_t"
-+	.byte	0x1	# DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
-+	.byte	0x17	# DW_AT_decl_line
-+	.long	0x87	# DW_AT_type
-+	.uleb128 0x5	# (DIE (0x64) DW_TAG_variable)
-+	.long	.LASF0	# DW_AT_name: "array"
-+	.byte	0x1	# DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
-+	.byte	0x18	# DW_AT_decl_line
-+	.long	0x59	# DW_AT_type
-+	.uleb128 0x3	# DW_AT_location
-+	.byte	0x91	# DW_OP_fbreg
-+	.sleb128 -56
-+	.byte	0x6	# DW_OP_deref
-+	.uleb128 0x6	# (DIE (0x73) DW_TAG_variable)
-+	.ascii "i\0"	# DW_AT_name
-+	.byte	0x1	# DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
-+	.byte	0x19	# DW_AT_decl_line
-+	.long	0x80	# DW_AT_type
-+	.uleb128 0x2	# DW_AT_location
-+	.byte	0x91	# DW_OP_fbreg
-+	.sleb128 -36
-+	.byte	0	# end of children of DIE 0x2d
-+	.uleb128 0x7	# (DIE (0x80) DW_TAG_base_type)
-+	.byte	0x4	# DW_AT_byte_size
-+	.byte	0x5	# DW_AT_encoding
-+	.ascii "int\0"	# DW_AT_name
-+	.uleb128 0x8	# (DIE (0x87) DW_TAG_array_type)
-+	.long	0xa1	# DW_AT_type
-+	.long	0x9a	# DW_AT_sibling
-+	.uleb128 0x9	# (DIE (0x90) DW_TAG_subrange_type)
-+	.long	0x9a	# DW_AT_type
-+	.uleb128 0x3	# DW_AT_upper_bound
-+	.byte	0x91	# DW_OP_fbreg
-+	.sleb128 -48
-+	.byte	0x6	# DW_OP_deref
-+	.byte	0	# end of children of DIE 0x87
-+	.uleb128 0xa	# (DIE (0x9a) DW_TAG_base_type)
-+	.byte	0x8	# DW_AT_byte_size
-+	.byte	0x7	# DW_AT_encoding
-+	.long	.LASF1	# DW_AT_name: "sizetype"
-+	.uleb128 0xa	# (DIE (0xa1) DW_TAG_base_type)
-+	.byte	0x1	# DW_AT_byte_size
-+	.byte	0x6	# DW_AT_encoding
-+	.long	.LASF2	# DW_AT_name: "char"
-+	.byte	0	# end of children of DIE 0xb
-+	.section	.debug_abbrev,"", at 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 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)
-+	.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 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 0x3	# (abbrev code)
-+	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
-+	.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 0x18	# (DW_FORM_exprloc)
-+	.byte	0
-+	.byte	0
-+	.uleb128 0x4	# (abbrev code)
-+	.uleb128 0x16	# (TAG: DW_TAG_typedef)
-+	.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)
-+	.byte	0
-+	.byte	0
-+	.uleb128 0x5	# (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 0x18	# (DW_FORM_exprloc)
-+	.byte	0
-+	.byte	0
-+	.uleb128 0x6	# (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 0x2	# (DW_AT_location)
-+	.uleb128 0x18	# (DW_FORM_exprloc)
-+	.byte	0
-+	.byte	0
-+	.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
-+	.uleb128 0x8	# (abbrev code)
-+	.uleb128 0x1	# (TAG: DW_TAG_array_type)
-+	.byte	0x1	# DW_children_yes
-+	.uleb128 0x49	# (DW_AT_type)
-+	.uleb128 0x13	# (DW_FORM_ref4)
-+	.uleb128 0x1	# (DW_AT_sibling)
-+	.uleb128 0x13	# (DW_FORM_ref4)
-+	.byte	0
-+	.byte	0
-+	.uleb128 0x9	# (abbrev code)
-+	.uleb128 0x21	# (TAG: DW_TAG_subrange_type)
-+	.byte	0	# DW_children_no
-+	.uleb128 0x49	# (DW_AT_type)
-+	.uleb128 0x13	# (DW_FORM_ref4)
-+	.uleb128 0x2f	# (DW_AT_upper_bound)
-+	.uleb128 0x18	# (DW_FORM_exprloc)
-+	.byte	0
-+	.byte	0
-+	.uleb128 0xa	# (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 0xe	# (DW_FORM_strp)
-+	.byte	0
-+	.byte	0
-+	.byte	0
-+	.section	.debug_aranges,"", at 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	.Ltext0	# Address
-+	.quad	.Letext0-.Ltext0	# Length
-+	.quad	0
-+	.quad	0
-+	.section	.debug_line,"", at progbits
-+.Ldebug_line0:
-+	.section	.debug_str,"MS", at progbits,1
-+.LASF4:
-+	.string	"gdb.arch/x86_64-vla-pointer.c"
-+.LASF7:
-+	.string	"array_t"
-+.LASF3:
-+	.string	"GNU C11 6.2.1 20160916 (Red Hat 6.2.1-2) -mtune=generic -march=x86-64 -g"
-+.LASF2:
-+	.string	"char"
-+.LASF1:
-+	.string	"sizetype"
-+.LASF5:
-+	.string	"/home/jkratoch/redhat/fedora/gdb/master/gdb-7.12/gdb/testsuite"
-+.LASF6:
-+	.string	"size"
-+.LASF0:
-+	.string	"array"
-+	.ident	"GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)"
-+	.section	.note.GNU-stack,"", at progbits
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
-@@ -0,0 +1,45 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2009 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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 0
-+
-+void
-+foo (int size)
-+{
-+  typedef char array_t[size];
-+  array_t array;
-+  int i;
-+
-+  for (i = 0; i < size; i++)
-+    array[i] = i;
-+
-+  array[0] = 0;	/* break-here */
-+}
-+
-+#else
-+
-+void foo (int size);
-+
-+int
-+main (void)
-+{
-+  foo (26);
-+  foo (78);
-+  return 0;
-+}
-+
-+#endif
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
-@@ -0,0 +1,65 @@
-+# Copyright 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 "x86_64-*-*"] then {
-+    verbose "Skipping over gdb.arch/x86_64-vla-pointer.exp test made only for x86_64."
-+    return
-+}
-+
-+set testfile x86_64-vla-pointer
-+set srcasmfile ${testfile}-foo.S
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+set binobjfile [standard_output_file ${testfile}-foo.o]
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcasmfile}" "${binobjfile}" object {}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${binobjfile}" "${binfile}" executable {}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto_main] {
-+    untested x86_64-vla-pointer
-+    return -1
-+}
-+
-+gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"]
-+
-+gdb_continue_to_breakpoint "break-here"
-+
-+gdb_test "whatis array" "type = array_t" "first: whatis array"
-+gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "first: whatis array_t"
-+gdb_test "ptype array" "type = char \\\[26\\\]" "first: ptype array"
-+
-+gdb_test "whatis *array" "type = char" "first: whatis *array"
-+gdb_test "ptype *array" "type = char" "first: ptype *array"
-+
-+gdb_test "p array\[1\]" "\\$\[0-9\] = 1 '\\\\001'"
-+gdb_test "p array\[2\]" "\\$\[0-9\] = 2 '\\\\002'"
-+gdb_test "p array\[3\]" "\\$\[0-9\] = 3 '\\\\003'"
-+gdb_test "p array\[4\]" "\\$\[0-9\] = 4 '\\\\004'"
-+
-+gdb_continue_to_breakpoint "break_here"
-+
-+gdb_test "whatis array" "type = array_t" "second: whatis array"
-+gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "second: whatis array_t"
-+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
-@@ -0,0 +1,455 @@
-+	.file	"x86_64-vla-typedef.c"
-+	.section	.debug_abbrev,"", at progbits
-+.Ldebug_abbrev0:
-+	.section	.debug_info,"", at progbits
-+.Ldebug_info0:
-+	.section	.debug_line,"", at progbits
-+.Ldebug_line0:
-+	.text
-+.Ltext0:
-+.globl foo
-+	.type	foo, @function
-+foo:
-+.LFB2:
-+	.file 1 "x86_64-vla-typedef.c"
-+	.loc 1 22 0
-+	pushq	%rbp
-+.LCFI0:
-+	movq	%rsp, %rbp
-+.LCFI1:
-+	subq	$64, %rsp
-+.LCFI2:
-+	movl	%edi, -36(%rbp)
-+	.loc 1 22 0
-+	movq	%rsp, %rax
-+	movq	%rax, -48(%rbp)
-+	.loc 1 23 0
-+	movl	-36(%rbp), %edx
-+	movslq	%edx,%rax
-+	subq	$1, %rax
-+	movq	%rax, -24(%rbp)
-+	.loc 1 24 0
-+	movslq	%edx,%rax
-+	addq	$15, %rax
-+	addq	$15, %rax
-+	shrq	$4, %rax
-+	salq	$4, %rax
-+	subq	%rax, %rsp
-+	movq	%rsp, -56(%rbp)
-+	movq	-56(%rbp), %rax
-+	addq	$15, %rax
-+	shrq	$4, %rax
-+	salq	$4, %rax
-+	movq	%rax, -56(%rbp)
-+	movq	-56(%rbp), %rax
-+	movq	%rax, -16(%rbp)
-+	.loc 1 27 0
-+	movl	$0, -4(%rbp)
-+	jmp	.L2
-+.L3:
-+	.loc 1 28 0
-+	movl	-4(%rbp), %esi
-+	movl	-4(%rbp), %eax
-+	movl	%eax, %ecx
-+	movq	-16(%rbp), %rdx
-+	movslq	%esi,%rax
-+	movb	%cl, (%rdx,%rax)
-+	.loc 1 27 0
-+	addl	$1, -4(%rbp)
-+.L2:
-+	movl	-4(%rbp), %eax
-+	cmpl	-36(%rbp), %eax
-+	jl	.L3
-+	.loc 1 30 0
-+	.globl	break_here
-+break_here:
-+	movq	-16(%rbp), %rax
-+	movb	$0, (%rax)
-+	movq	-48(%rbp), %rsp
-+	.loc 1 31 0
-+	leave
-+	ret
-+.LFE2:
-+	.size	foo, .-foo
-+	.section	.debug_frame,"", at progbits
-+.Lframe0:
-+	.long	.LECIE0-.LSCIE0
-+.LSCIE0:
-+	.long	0xffffffff
-+	.byte	0x1
-+	.string	""
-+	.uleb128 0x1
-+	.sleb128 -8
-+	.byte	0x10
-+	.byte	0xc
-+	.uleb128 0x7
-+	.uleb128 0x8
-+	.byte	0x90
-+	.uleb128 0x1
-+	.align 8
-+.LECIE0:
-+.LSFDE0:
-+	.long	.LEFDE0-.LASFDE0
-+.LASFDE0:
-+	.long	.Lframe0
-+	.quad	.LFB2
-+	.quad	.LFE2-.LFB2
-+	.byte	0x4
-+	.long	.LCFI0-.LFB2
-+	.byte	0xe
-+	.uleb128 0x10
-+	.byte	0x86
-+	.uleb128 0x2
-+	.byte	0x4
-+	.long	.LCFI1-.LCFI0
-+	.byte	0xd
-+	.uleb128 0x6
-+	.align 8
-+.LEFDE0:
-+	.section	.eh_frame,"a", at progbits
-+.Lframe1:
-+	.long	.LECIE1-.LSCIE1
-+.LSCIE1:
-+	.long	0x0
-+	.byte	0x1
-+	.string	"zR"
-+	.uleb128 0x1
-+	.sleb128 -8
-+	.byte	0x10
-+	.uleb128 0x1
-+	.byte	0x3
-+	.byte	0xc
-+	.uleb128 0x7
-+	.uleb128 0x8
-+	.byte	0x90
-+	.uleb128 0x1
-+	.align 8
-+.LECIE1:
-+.LSFDE1:
-+	.long	.LEFDE1-.LASFDE1
-+.LASFDE1:
-+	.long	.LASFDE1-.Lframe1
-+	.long	.LFB2
-+	.long	.LFE2-.LFB2
-+	.uleb128 0x0
-+	.byte	0x4
-+	.long	.LCFI0-.LFB2
-+	.byte	0xe
-+	.uleb128 0x10
-+	.byte	0x86
-+	.uleb128 0x2
-+	.byte	0x4
-+	.long	.LCFI1-.LCFI0
-+	.byte	0xd
-+	.uleb128 0x6
-+	.align 8
-+.LEFDE1:
-+	.text
-+.Letext0:
-+	.section	.debug_loc,"", at progbits
-+.Ldebug_loc0:
-+.LLST0:
-+	.quad	.LFB2-.Ltext0
-+	.quad	.LCFI0-.Ltext0
-+	.value	0x2
-+	.byte	0x77
-+	.sleb128 8
-+	.quad	.LCFI0-.Ltext0
-+	.quad	.LCFI1-.Ltext0
-+	.value	0x2
-+	.byte	0x77
-+	.sleb128 16
-+	.quad	.LCFI1-.Ltext0
-+	.quad	.LFE2-.Ltext0
-+	.value	0x2
-+	.byte	0x76
-+	.sleb128 16
-+	.quad	0x0
-+	.quad	0x0
-+	.section	.debug_info
-+	.long	.Ldebug_end - .Ldebug_start
-+.Ldebug_start:
-+	.value	0x2
-+	.long	.Ldebug_abbrev0
-+	.byte	0x8
-+	.uleb128 0x1
-+	.long	.LASF2
-+	.byte	0x1
-+	.long	.LASF3
-+	.long	.LASF4
-+	.quad	.Ltext0
-+	.quad	.Letext0
-+	.long	.Ldebug_line0
-+	.uleb128 0x2
-+	.byte	0x1
-+	.string	"foo"
-+	.byte	0x1
-+	.byte	0x16
-+	.byte	0x1
-+	.quad	.LFB2
-+	.quad	.LFE2
-+	.long	.LLST0
-+	.long	0x83
-+	.uleb128 0x3
-+	.long	.LASF5
-+	.byte	0x1
-+	.byte	0x15
-+	.long	0x83
-+	.byte	0x2
-+	.byte	0x91
-+	.sleb128 -52
-+.Ltag_typedef:
-+	.uleb128 0x4
-+	.long	.LASF6
-+	.byte	0x1
-+	.byte	0x17
-+	.long	.Ltag_array_type - .debug_info
-+	.uleb128 0x5	/* Abbrev Number: 5 (DW_TAG_variable) */
-+	.long	.LASF0
-+	.byte	0x1
-+	.byte	0x18
-+#if 1
-+	.long	.Ltag_typedef - .debug_info
-+#else
-+	/* Debugging only: Skip the typedef indirection.  */
-+	.long	.Ltag_array_type - .debug_info
-+#endif
-+	/* DW_AT_location: DW_FORM_block1: start */
-+	.byte	0x3
-+	.byte	0x91
-+	.sleb128 -32
-+#if 0
-+	.byte	0x6	/* DW_OP_deref */
-+#else
-+	.byte	0x96	/* DW_OP_nop */
-+#endif
-+	/* DW_AT_location: DW_FORM_block1: end */
-+	.uleb128 0x6
-+	.string	"i"
-+	.byte	0x1
-+	.byte	0x19
-+	.long	0x83
-+	.byte	0x2
-+	.byte	0x91
-+	.sleb128 -20
-+	.byte	0x0
-+	.uleb128 0x7
-+	.byte	0x4
-+	.byte	0x5
-+	.string	"int"
-+.Ltag_array_type:
-+	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
-+	.long	0xa0 + (2f - 1f)	/* DW_AT_type: DW_FORM_ref4 */
-+	.long	0x9d + (2f - 1f)	/* DW_AT_sibling: DW_FORM_ref4 */
-+1:	/* DW_AT_data_location: DW_FORM_block1: start */
-+	.byte	2f - 3f	/* length */
-+3:
-+	.byte	0x97	/* DW_OP_push_object_address */
-+	.byte	0x6	/* DW_OP_deref */
-+2:	/* DW_AT_data_location: DW_FORM_block1: end */
-+	.uleb128 0x9
-+	.long	0x9d + (2b - 1b)	/* DW_AT_type: DW_FORM_ref4 */
-+	.byte	0x3
-+	.byte	0x91
-+	.sleb128 -40
-+	.byte	0x6
-+	.byte	0x0
-+	.uleb128 0xa
-+	.byte	0x8
-+	.byte	0x7
-+	.uleb128 0xb
-+	.byte	0x1
-+	.byte	0x6
-+	.long	.LASF1
-+	.byte	0x0
-+.Ldebug_end:
-+	.section	.debug_abbrev
-+	.uleb128 0x1
-+	.uleb128 0x11
-+	.byte	0x1
-+	.uleb128 0x25
-+	.uleb128 0xe
-+	.uleb128 0x13
-+	.uleb128 0xb
-+	.uleb128 0x3
-+	.uleb128 0xe
-+	.uleb128 0x1b
-+	.uleb128 0xe
-+	.uleb128 0x11
-+	.uleb128 0x1
-+	.uleb128 0x12
-+	.uleb128 0x1
-+	.uleb128 0x10
-+	.uleb128 0x6
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x2
-+	.uleb128 0x2e
-+	.byte	0x1
-+	.uleb128 0x3f
-+	.uleb128 0xc
-+	.uleb128 0x3
-+	.uleb128 0x8
-+	.uleb128 0x3a
-+	.uleb128 0xb
-+	.uleb128 0x3b
-+	.uleb128 0xb
-+	.uleb128 0x27
-+	.uleb128 0xc
-+	.uleb128 0x11
-+	.uleb128 0x1
-+	.uleb128 0x12
-+	.uleb128 0x1
-+	.uleb128 0x40
-+	.uleb128 0x6
-+	.uleb128 0x1
-+	.uleb128 0x13
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x3
-+	.uleb128 0x5
-+	.byte	0x0
-+	.uleb128 0x3
-+	.uleb128 0xe
-+	.uleb128 0x3a
-+	.uleb128 0xb
-+	.uleb128 0x3b
-+	.uleb128 0xb
-+	.uleb128 0x49
-+	.uleb128 0x13
-+	.uleb128 0x2
-+	.uleb128 0xa
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x4
-+	.uleb128 0x16
-+	.byte	0x0
-+	.uleb128 0x3
-+	.uleb128 0xe
-+	.uleb128 0x3a
-+	.uleb128 0xb
-+	.uleb128 0x3b
-+	.uleb128 0xb
-+	.uleb128 0x49
-+	.uleb128 0x13
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x5
-+	.uleb128 0x34
-+	.byte	0x0
-+	.uleb128 0x3
-+	.uleb128 0xe
-+	.uleb128 0x3a
-+	.uleb128 0xb
-+	.uleb128 0x3b
-+	.uleb128 0xb
-+	.uleb128 0x49
-+	.uleb128 0x13
-+	.uleb128 0x2
-+	.uleb128 0xa
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x6
-+	.uleb128 0x34
-+	.byte	0x0
-+	.uleb128 0x3
-+	.uleb128 0x8
-+	.uleb128 0x3a
-+	.uleb128 0xb
-+	.uleb128 0x3b
-+	.uleb128 0xb
-+	.uleb128 0x49
-+	.uleb128 0x13
-+	.uleb128 0x2
-+	.uleb128 0xa
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x7
-+	.uleb128 0x24
-+	.byte	0x0
-+	.uleb128 0xb
-+	.uleb128 0xb
-+	.uleb128 0x3e
-+	.uleb128 0xb
-+	.uleb128 0x3
-+	.uleb128 0x8
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
-+	.uleb128 0x1
-+	.byte	0x1
-+	.uleb128 0x49	/* DW_AT_type */
-+	.uleb128 0x13	/* DW_FORM_ref4 */
-+	.uleb128 0x1	/* DW_AT_sibling */
-+	.uleb128 0x13	/* DW_FORM_ref4 */
-+	.uleb128 0x50	/* DW_AT_data_location */
-+	.uleb128 0xa	/* DW_FORM_block1 */
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0x9
-+	.uleb128 0x21
-+	.byte	0x0
-+	.uleb128 0x49	/* DW_AT_type */
-+	.uleb128 0x13	/* DW_FORM_ref4 */
-+	.uleb128 0x2f
-+	.uleb128 0xa
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0xa
-+	.uleb128 0x24
-+	.byte	0x0
-+	.uleb128 0xb
-+	.uleb128 0xb
-+	.uleb128 0x3e
-+	.uleb128 0xb
-+	.byte	0x0
-+	.byte	0x0
-+	.uleb128 0xb
-+	.uleb128 0x24
-+	.byte	0x0
-+	.uleb128 0xb
-+	.uleb128 0xb
-+	.uleb128 0x3e
-+	.uleb128 0xb
-+	.uleb128 0x3
-+	.uleb128 0xe
-+	.byte	0x0
-+	.byte	0x0
-+	.byte	0x0
-+	.section	.debug_pubnames,"", at progbits
-+	.long	0x16
-+	.value	0x2
-+	.long	.Ldebug_info0
-+	.long	0xa8
-+	.long	0x2d
-+	.string	"foo"
-+	.long	0x0
-+	.section	.debug_aranges,"", at progbits
-+	.long	0x2c
-+	.value	0x2
-+	.long	.Ldebug_info0
-+	.byte	0x8
-+	.byte	0x0
-+	.value	0x0
-+	.value	0x0
-+	.quad	.Ltext0
-+	.quad	.Letext0-.Ltext0
-+	.quad	0x0
-+	.quad	0x0
-+	.section	.debug_str,"MS", at progbits,1
-+.LASF0:
-+	.string	"array"
-+.LASF5:
-+	.string	"size"
-+.LASF3:
-+	.string	"x86_64-vla-typedef.c"
-+.LASF6:
-+	.string	"array_t"
-+.LASF1:
-+	.string	"char"
-+.LASF4:
-+	.string	"gdb.arch"
-+.LASF2:
-+	.string	"GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
-+	.ident	"GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
-+	.section	.note.GNU-stack,"", at progbits
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
-@@ -0,0 +1,45 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2008 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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 0
-+
-+void
-+foo (int size)
-+{
-+  typedef char array_t[size];
-+  array_t array;
-+  int i;
-+
-+  for (i = 0; i < size; i++)
-+    array[i] = i;
-+
-+  array[0] = 0;	/* break-here */
-+}
-+
-+#else
-+
-+void foo (int size);
-+
-+int
-+main (void)
-+{
-+  foo (26);
-+  foo (78);
-+  return 0;
-+}
-+
-+#endif
-diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
-@@ -0,0 +1,64 @@
-+# Copyright 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 DW_AT_data_location accessed through DW_TAG_typedef intermediate.
-+
-+if ![istarget "x86_64-*-*"] then {
-+    verbose "Skipping over gdb.arch/x86_64-vla-typedef.exp test made only for x86_64."
-+    return
-+}
-+
-+set testfile x86_64-vla-typedef
-+set srcasmfile ${testfile}-foo.S
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+set binobjfile [standard_output_file ${testfile}-foo.o]
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcasmfile}" "${binobjfile}" object {}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${binobjfile}" "${binfile}" executable {debug}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto_main] {
-+    untested x86_64-vla-typedef
-+    return -1
-+}
-+
-+gdb_breakpoint "break_here"
-+
-+gdb_continue_to_breakpoint "break_here"
-+
-+gdb_test "whatis array" "type = array_t" "first: whatis array"
-+
-+gdb_test "ptype array" "type = char \\\[26\\\]" "first: ptype array"
-+
-+gdb_test "p array\[1\]" "\\$\[0-9\] = 1 '\\\\001'"
-+gdb_test "p array\[2\]" "\\$\[0-9\] = 2 '\\\\002'"
-+gdb_test "p array\[3\]" "\\$\[0-9\] = 3 '\\\\003'"
-+gdb_test "p array\[4\]" "\\$\[0-9\] = 4 '\\\\004'"
-+
-+gdb_continue_to_breakpoint "break_here"
-+
-+gdb_test "whatis array" "type = array_t" "second: whatis array"
-+
-+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
-diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx.c
---- a/gdb/testsuite/gdb.base/arrayidx.c
-+++ b/gdb/testsuite/gdb.base/arrayidx.c
-@@ -17,6 +17,13 @@
- 
- int array[] = {1, 2, 3, 4};
- 
-+#ifdef __GNUC__
-+struct
-+  {
-+    int a[0];
-+  } unbound;
-+#endif
-+
- int
- main (void)
- {
-diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
---- a/gdb/testsuite/gdb.base/arrayidx.exp
-+++ b/gdb/testsuite/gdb.base/arrayidx.exp
-@@ -49,4 +49,12 @@ gdb_test "print array" \
-          "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
-          "print array with array-indexes on"
- 
--
-+set test "p unbound.a == &unbound.a\[0\]"
-+gdb_test_multiple $test $test {
-+    -re " = 1\r\n$gdb_prompt $" {
-+	pass $test
-+    }
-+    -re "No symbol \"unbound\" in current context.\r\n$gdb_prompt $" {
-+	unsupported "$test (no GCC)"
-+    }
-+}
-diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.c b/gdb/testsuite/gdb.base/internal-var-field-address.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/internal-var-field-address.c
-@@ -0,0 +1,20 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2009 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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 {
-+  int field;
-+} staticstruct = { 1 };
-diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp
-@@ -0,0 +1,26 @@
-+# Copyright 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 internal-var-field-address
-+set binfile ${test}.x
-+if  { [gdb_compile "${srcdir}/${subdir}/${test}.c" "[standard_output_file ${binfile}]" object {debug}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+
-+clean_restart $binfile
-+
-+gdb_test {set $varstruct = staticstruct}
-+gdb_test {p $varstruct.field} " = 1"
-diff --git a/gdb/testsuite/gdb.base/vla-frame.c b/gdb/testsuite/gdb.base/vla-frame.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla-frame.c
-@@ -0,0 +1,31 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2011 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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.h>
-+
-+int
-+main (int argc, char **argv)
-+{
-+  char s[2 + argc];
-+  void (*f) (char *) = 0;
-+
-+  memset (s, 0, sizeof (s));
-+  s[0] = 'X';
-+
-+  f (s);
-+  return 0;
-+}
-diff --git a/gdb/testsuite/gdb.base/vla-frame.exp b/gdb/testsuite/gdb.base/vla-frame.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla-frame.exp
-@@ -0,0 +1,38 @@
-+# Copyright 2011 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 testfile vla-frame
-+set executable ${testfile}
-+
-+if { [prepare_for_testing ${testfile}.exp ${executable}] } {
-+    return -1
-+}
-+
-+if ![runto_main] {
-+    return -1
-+}
-+
-+set test "continue"
-+gdb_test_multiple $test $test {
-+    -re "Continuing\\.\r\n\r\nProgram received signal SIGSEGV, Segmentation fault\\.\r\n0x0+ in \\?\\? \\(\\)\r\n$gdb_prompt $" {
-+	pass $test
-+    }
-+    -re "\r\n$gdb_prompt $" {
-+	untested ${testfile}.exp
-+	return
-+    }
-+}
-+
-+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
-diff --git a/gdb/testsuite/gdb.base/vla-overflow.c b/gdb/testsuite/gdb.base/vla-overflow.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla-overflow.c
-@@ -0,0 +1,30 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2008 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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
-+main (int argc, char **argv)
-+{
-+  int array[argc];
-+
-+  array[0] = array[0];
-+
-+  abort ();
-+
-+  return 0;
-+}
-diff --git a/gdb/testsuite/gdb.base/vla-overflow.exp b/gdb/testsuite/gdb.base/vla-overflow.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla-overflow.exp
-@@ -0,0 +1,109 @@
-+# Copyright 2008 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+# We could crash in:
-+# #0  block_linkage_function (bl=0x0) at ../../gdb/block.c:69
-+# #1  in dwarf_block_get_frame_base (...) at ../../gdb/dwarf2block.c:97
-+#   97	  framefunc = block_linkage_function (get_frame_block (frame, NULL));
-+# #2  in execute_stack_op (...) at ../../gdb/dwarf2expr.c:496
-+# #3  in dwarf_block_exec_core () at ../../gdb/dwarf2block.c:156
-+# #4  dwarf_block_exec (...) at ../../gdb/dwarf2block.c:206
-+# #5  in range_type_count_bound_internal (...) at ../../gdb/gdbtypes.c:1430
-+# #6  in create_array_type (...) at ../../gdb/gdbtypes.c:840
-+# ...
-+# #21 in psymtab_to_symtab (...) at ../../gdb/symfile.c:292
-+# ...
-+# #29 in backtrace_command_1 () at ../../gdb/stack.c:1273
-+
-+set testfile vla-overflow
-+set shfile [standard_output_file ${testfile}-gdb.sh]
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+
-+set f [open "|getconf PAGESIZE" "r"]
-+gets $f pagesize
-+close $f
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+set pid_of_gdb [exp_pid -i [board_info host fileid]]
-+
-+if { [runto_main] < 0 } {
-+    untested vla-overflow
-+    return -1
-+}
-+
-+# Get the GDB memory size when we stay at main.
-+
-+proc memory_v_pages_get {} {
-+    global pid_of_gdb pagesize
-+    set fd [open "/proc/$pid_of_gdb/statm"]
-+    gets $fd line
-+    close $fd
-+    # number of pages of virtual memory
-+    scan $line "%d" drs
-+    return $drs
-+}
-+
-+set pages_found [memory_v_pages_get]
-+
-+# s390x with glibc-debuginfo.s390x installed used approx. 16MB.
-+set mb_reserve 40
-+verbose -log "pages_found = $pages_found, mb_reserve = $mb_reserve"
-+set kb_found [expr $pages_found * $pagesize / 1024]
-+set kb_permit [expr $kb_found + 1 * 1024 + $mb_reserve * 1024]
-+verbose -log "kb_found = $kb_found, kb_permit = $kb_permit"
-+
-+# Create the ulimit wrapper.
-+set f [open $shfile "w"]
-+puts $f "#! /bin/sh"
-+puts $f "ulimit -v $kb_permit"
-+puts $f "exec $GDB \"\$@\""
-+close $f
-+remote_exec host "chmod +x $shfile"
-+
-+gdb_exit
-+set GDBold $GDB
-+set GDB "$shfile"
-+gdb_start
-+set GDB $GDBold
-+
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+set pid_of_gdb [exp_pid -i [board_info host fileid]]
-+
-+# Check the size again after the second run.
-+# We must not stop in main as it would cache `array' and never crash later.
-+
-+gdb_run_cmd
-+
-+verbose -log "kb_found before abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
-+
-+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
-+
-+verbose -log "kb_found in abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
-+
-+# `abort' can get expressed as `*__GI_abort'.
-+gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
-+
-+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
-diff --git a/gdb/testsuite/gdb.base/vla.c b/gdb/testsuite/gdb.base/vla.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla.c
-@@ -0,0 +1,55 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2008 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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.h>
-+
-+void
-+marker (void)
-+{
-+}
-+
-+void
-+bar (char *a, char *b, char *c, int size)
-+{
-+  memset (a, '1', size);
-+  memset (b, '2', size);
-+  memset (c, '3', 48);
-+}
-+
-+void
-+foo (int size)
-+{
-+  char temp1[size];
-+  char temp3[48];
-+
-+  temp1[size - 1] = '\0';
-+  {
-+    char temp2[size];
-+
-+    bar (temp1, temp2, temp3, size);
-+
-+    marker ();	/* break-here */
-+  }
-+}
-+
-+int
-+main (void)
-+{
-+  foo (26);
-+  foo (78);
-+  return 0;
-+}
-diff --git a/gdb/testsuite/gdb.base/vla.exp b/gdb/testsuite/gdb.base/vla.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/vla.exp
-@@ -0,0 +1,62 @@
-+# Copyright 2008 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 testfile vla
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto_main] {
-+    untested vla
-+    return -1
-+}
-+
-+gdb_breakpoint [gdb_get_line_number "break-here"]
-+
-+gdb_continue_to_breakpoint "break-here"
-+
-+gdb_test "whatis temp1" "type = char \\\[26\\\]" "first: whatis temp1"
-+gdb_test "whatis temp2" "type = char \\\[26\\\]" "first: whatis temp2"
-+gdb_test "whatis temp3" "type = char \\\[48\\\]" "first: whatis temp3"
-+
-+gdb_test "ptype temp1" "type = char \\\[26\\\]" "first: ptype temp1"
-+gdb_test "ptype temp2" "type = char \\\[26\\\]" "first: ptype temp2"
-+gdb_test "ptype temp3" "type = char \\\[48\\\]" "first: ptype temp3"
-+
-+gdb_test "p temp1" " = '1' <repeats 26 times>" "first: print temp1"
-+gdb_test "p temp2" " = '2' <repeats 26 times>" "first: print temp2"
-+gdb_test "p temp3" " = '3' <repeats 48 times>" "first: print temp3"
-+
-+gdb_continue_to_breakpoint "break-here"
-+
-+gdb_test "whatis temp1" "type = char \\\[78\\\]" "second: whatis temp1"
-+gdb_test "whatis temp2" "type = char \\\[78\\\]" "second: whatis temp2"
-+gdb_test "whatis temp3" "type = char \\\[48\\\]" "second: whatis temp3"
-+
-+gdb_test "ptype temp1" "type = char \\\[78\\\]" "second: ptype temp1"
-+gdb_test "ptype temp2" "type = char \\\[78\\\]" "second: ptype temp2"
-+gdb_test "ptype temp3" "type = char \\\[48\\\]" "second: ptype temp3"
-+
-+gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
-+gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
-+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
-diff --git a/gdb/testsuite/gdb.cp/gdb9593.cc b/gdb/testsuite/gdb.cp/gdb9593.cc
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.cp/gdb9593.cc
-@@ -0,0 +1,179 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2008, 2009 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   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>
-+
-+using namespace std;
-+
-+class NextOverThrowDerivates
-+{
-+
-+public:
-+
-+
-+  // Single throw an exception in this function.
-+  void function1()
-+  {
-+    throw 20;
-+  }
-+
-+  // Throw an exception in another function.
-+  void function2()
-+  {
-+    function1();
-+  }
-+
-+  // Throw an exception in another function, but handle it
-+  // locally.
-+  void function3 ()
-+  {
-+    {
-+      try
-+	{
-+	  function1 ();
-+	}
-+      catch (...)
-+	{
-+	  cout << "Caught and handled function1 exception" << endl;
-+	}
-+    }
-+  }
-+
-+  void rethrow ()
-+  {
-+    try
-+      {
-+	function1 ();
-+      }
-+    catch (...)
-+      {
-+	throw;
-+      }
-+  }
-+
-+  void finish ()
-+  {
-+    // We use this to test that a "finish" here does not end up in
-+    // this frame, but in the one above.
-+    try
-+      {
-+	function1 ();
-+      }
-+    catch (int x)
-+      {
-+      }
-+    function1 ();		// marker for until
-+  }
-+
-+  void until ()
-+  {
-+    function1 ();
-+    function1 ();		// until here
-+  }
-+
-+};
-+NextOverThrowDerivates next_cases;
-+
-+
-+int main ()
-+{
-+  try
-+    {
-+      next_cases.function1 ();
-+    }
-+  catch (...)
-+    {
-+      // Discard
-+    }
-+
-+  try
-+    {
-+      next_cases.function2 ();
-+    }
-+  catch (...)
-+    {
-+      // Discard
-+    }
-+
-+  try
-+    {
-+      // This is duplicated so we can next over one but step into
-+      // another.
-+      next_cases.function2 ();
-+    }
-+  catch (...)
-+    {
-+      // Discard
-+    }
-+
-+  next_cases.function3 ();
-+
-+  try
-+    {
-+      next_cases.rethrow ();
-+    }
-+  catch (...)
-+    {
-+      // Discard
-+    }
-+
-+  try
-+    {
-+      // Another duplicate so we can test "finish".
-+      next_cases.function2 ();
-+    }
-+  catch (...)
-+    {
-+      // Discard
-+    }
-+
-+  // Another test for "finish".
-+  try
-+    {
-+      next_cases.finish ();
-+    }
-+  catch (...)
-+    {
-+    }
-+
-+  // Test of "until".
-+  try
-+    {
-+      next_cases.finish ();
-+    }
-+  catch (...)
-+    {
-+    }
-+
-+  // Test of "until" with an argument.
-+  try
-+    {
-+      next_cases.until ();
-+    }
-+  catch (...)
-+    {
-+    }
-+
-+  // Test of "advance".
-+  try
-+    {
-+      next_cases.until ();
-+    }
-+  catch (...)
-+    {
-+    }
-+}
-diff --git a/gdb/testsuite/gdb.cp/gdb9593.exp b/gdb/testsuite/gdb.cp/gdb9593.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.cp/gdb9593.exp
-@@ -0,0 +1,189 @@
-+# Copyright 2008, 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 $tracelevel then {
-+    strace $tracelevel
-+}
-+
-+if { [skip_cplus_tests] } { continue }
-+
-+set testfile "gdb9593"
-+set srcfile ${testfile}.cc
-+set binfile [standard_output_file $testfile]
-+
-+# Create and source the file that provides information about the compiler
-+# used to compile the test case.
-+if [get_compiler_info "c++"] {
-+    untested gdb9593.exp
-+    return -1
-+}
-+
-+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
-+    untested gdb9593.exp
-+    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 "*-*-*" 9593
-+    fail "This target can not call functions"
-+    continue
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto_main] then {
-+    perror "couldn't run to main"
-+    continue
-+}
-+
-+# See whether we have the needed unwinder hooks.
-+set ok 1
-+gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" {
-+    -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
-+	pass "check for unwinder hook"
-+    }
-+    -re "No symbol .* in current context.\r\n$gdb_prompt $" {
-+	# Pass the test so we don't get bogus fails in the results.
-+	pass "check for unwinder hook"
-+	set ok 0
-+    }
-+}
-+if {!$ok} {
-+    untested gdb9593.exp
-+    return -1
-+}
-+
-+# See http://sourceware.org/bugzilla/show_bug.cgi?id=9593
-+
-+gdb_test "next" \
-+    ".*catch (...).*" \
-+    "next over a throw 1"
-+
-+gdb_test "next" \
-+  ".*next_cases.function2.*" \
-+  "next past catch 1"
-+
-+gdb_test "next" \
-+    ".*catch (...).*" \
-+    "next over a throw 2"
-+
-+gdb_test "next" \
-+  ".*next_cases.function2.*" \
-+  "next past catch 2"
-+
-+gdb_test "step" \
-+  ".*function1().*" \
-+  "step into function2 1"
-+
-+gdb_test "next" \
-+    ".*catch (...).*" \
-+    "next over a throw 3"
-+
-+gdb_test "next" \
-+  ".*next_cases.function3.*" \
-+  "next past catch 3"
-+
-+gdb_test "next" \
-+  ".*next_cases.rethrow.*" \
-+    "next over a throw 4"
-+
-+gdb_test "next" \
-+  ".*catch (...).*" \
-+  "next over a rethrow"
-+
-+gdb_test "next" \
-+  ".*next_cases.function2.*" \
-+  "next after a rethrow"
-+
-+gdb_test "step" \
-+  ".*function1().*" \
-+  "step into function2 2"
-+
-+gdb_test "finish" \
-+  ".*catch (...).*" \
-+  "finish 1"
-+
-+gdb_test "next" \
-+  ".*next_cases.finish ().*" \
-+  "next past catch 4"
-+
-+gdb_test "step" \
-+  ".*function1 ().*" \
-+  "step into finish method"
-+
-+gdb_test "finish" \
-+  ".*catch (...).*" \
-+  "finish 2"
-+
-+gdb_test "next" \
-+  ".*next_cases.finish ().*" \
-+  "next past catch 5"
-+
-+gdb_test "step" \
-+  ".*function1 ().*" \
-+  "step into finish, for until"
-+
-+gdb_test_multiple "until" "until with no argument 1" {
-+    -re -wrap ".*function1 ().*" {
-+	pass $gdb_test_name
-+    }
-+    -re -wrap ".*$hex\t80\t  \}" {
-+	# PR gcc/97774 - "Incorrect line info for try/catch"
-+	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97774
-+	xfail $gdb_test_name
-+    }
-+}
-+
-+set line [gdb_get_line_number "marker for until" $testfile.cc]
-+
-+gdb_test "until $line" \
-+  ".*function1 ().*" \
-+  "next past catch 6"
-+
-+gdb_test "until" \
-+  ".*catch (...).*" \
-+  "until with no argument 2"
-+
-+set line [gdb_get_line_number "until here" $testfile.cc]
-+
-+gdb_test "next" \
-+  ".*next_cases.until ().*" \
-+  "next past catch 6"
-+
-+gdb_test "step" \
-+  ".*function1 ().*" \
-+  "step into until"
-+
-+gdb_test "until $line" \
-+  ".*catch (...).*" \
-+  "until-over-throw"
-+
-+gdb_test "next" \
-+  ".*next_cases.until ().*" \
-+  "next past catch 7"
-+
-+gdb_test "step" \
-+  ".*function1 ().*" \
-+  "step into until, for advance"
-+
-+gdb_test "advance $line" \
-+  ".*catch (...).*" \
-+  "advance-over-throw"
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
-@@ -0,0 +1,246 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2010 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+
-+/* Debug information */
-+
-+/* We will `break *main' at the very first instruction.  */
-+#define main_length 1
-+
-+	.section	.data
-+vardata:
-+	/* See DW_OP_lit3 + 1 (0-based).  */
-+	.string		"seennotseen"
-+
-+	.section	.debug_info
-+.Lcu1_begin:
-+	.4byte		.Lcu1_end - .Lcu1_start	/* Length of Compilation Unit */
-+.Lcu1_start:
-+	.2byte		2			/* DWARF version number */
-+	.4byte		.Ldebug_abbrev0		/* Offset Into Abbrev. Section */
-+	.byte		4			/* Pointer Size (in bytes) */
-+
-+	/* CU die */
-+	.uleb128	1			/* Abbrev: DW_TAG_compile_unit */
-+	.4byte		.Lproducer		/* DW_AT_producer */
-+	/* Use C++ to exploit a bug in parsing DW_AT_name "".  */
-+	.byte		4			/* DW_AT_language (C++) -  */
-+	.4byte		main			/* DW_AT_low_pc */
-+	.byte		main_length		/* DW_AT_high_pc */
-+
-+.Larray_type:
-+	.uleb128	2			/* Abbrev: DW_TAG_array_type */
-+	.4byte		.Lchar_type-.Lcu1_begin	/* DW_AT_type */
-+
-+	.uleb128	3			/* Abbrev: DW_TAG_subrange_type */
-+	.4byte		.Luint_type-.Lcu1_begin	/* DW_AT_type */
-+	.byte		0			/* DW_AT_lower_bound */
-+	.4byte		.Llen_var-.Lcu1_begin	/* DW_AT_upper_bound */
-+	.byte		0			/* End of children of die */
-+
-+	/* DW_AT_upper_bound is referencing an optimized-out variable.  */
-+.Larrayb_type:
-+	.uleb128	2			/* Abbrev: DW_TAG_array_type */
-+	.4byte		.Lchar_type-.Lcu1_begin	/* DW_AT_type */
-+
-+	.uleb128	3			/* Abbrev: DW_TAG_subrange_type */
-+	.4byte		.Luint_type-.Lcu1_begin	/* DW_AT_type */
-+	.byte		0			/* DW_AT_lower_bound */
-+	.4byte		.Llenb_var-.Lcu1_begin	/* DW_AT_upper_bound */
-+	.byte		0			/* End of children of die */
-+
-+	/* DW_AT_upper_bound is referencing register.  */
-+.Larrayreg_type:
-+	.uleb128	2			/* Abbrev: DW_TAG_array_type */
-+	.4byte		.Lchar_type-.Lcu1_begin	/* DW_AT_type */
-+
-+	.uleb128	8			/* Abbrev: DW_TAG_subrange_type with block */
-+	.4byte		.Luint_type-.Lcu1_begin	/* DW_AT_type */
-+	.byte		0			/* DW_AT_lower_bound */
-+	.byte		2f - 1f			/* DW_AT_upper_bound */
-+1:	.byte		0x50			/* DW_OP_reg0 */
-+2:
-+	.byte		0			/* End of children of die */
-+
-+.Luint_type:
-+	.uleb128	4			/* Abbrev: DW_TAG_base_type */
-+	.4byte		.Luint_str		/* DW_AT_name */
-+	.byte		4			/* DW_AT_byte_size */
-+	.byte		7			/* DW_AT_encoding */
-+
-+.Lchar_type:
-+	.uleb128	4			/* Abbrev: DW_TAG_base_type */
-+	.4byte		.Lchar_str		/* DW_AT_name */
-+	.byte		1			/* DW_AT_byte_size */
-+	.byte		6			/* DW_AT_encoding */
-+
-+.Llen_var:
-+	.uleb128	5			/* Abbrev: DW_TAG_variable artificial */
-+	.byte		1			/* DW_AT_artificial */
-+	.4byte		.Luint_type-.Lcu1_begin	/* DW_AT_type */
-+	.4byte		.Llen_loclist-.Lloclist	/* DW_AT_location */
-+
-+	/* optimized-out variable for b_string.  */
-+.Llenb_var:
-+	.uleb128	7			/* Abbrev: DW_TAG_variable artificial no DW_AT_location */
-+	.byte		1			/* DW_AT_artificial */
-+	.4byte		.Luint_type-.Lcu1_begin	/* DW_AT_type */
-+
-+	.uleb128	6			/* Abbrev: DW_TAG_variable DW_FORM_string */
-+	.string		"a_string"		/* DW_AT_name */
-+	.4byte		.Larray_type-.Lcu1_begin /* DW_AT_type */
-+	.byte		2f - 1f			/* DW_AT_location */
-+1:	.byte		3			/*   DW_OP_addr */
-+	.4byte		vardata			/*   <addr> */
-+2:
-+
-+	/* DW_AT_upper_bound is referencing an optimized-out variable.  */
-+	.uleb128	6			/* Abbrev: DW_TAG_variable DW_FORM_string */
-+	.string		"b_string"		/* DW_AT_name */
-+	.4byte		.Larrayb_type-.Lcu1_begin /* DW_AT_type */
-+	.byte		2f - 1f			/* DW_AT_location */
-+1:	.byte		3			/*   DW_OP_addr */
-+	.4byte		vardata			/*   <addr> */
-+2:
-+
-+	/* DW_AT_upper_bound is referencing register.  */
-+	.uleb128	6			/* Abbrev: DW_TAG_variable DW_FORM_string */
-+	.string		"reg_string"		/* DW_AT_name */
-+	.4byte		.Larrayreg_type-.Lcu1_begin /* DW_AT_type */
-+	.byte		2f - 1f			/* DW_AT_location */
-+1:	.byte		3			/*   DW_OP_addr */
-+	.4byte		vardata			/*   <addr> */
-+2:
-+
-+	.byte		0			/* End of children of CU */
-+.Lcu1_end:
-+
-+	.section	.debug_loc
-+.Lloclist:
-+.Llen_loclist:
-+	.4byte	0			# Location list begin address
-+	.4byte	main_length		# Location list end address
-+	.value	2f-1f	# Location expression size
-+1:	.byte	0x33	# DW_OP_lit3
-+	.byte	0x9f	# DW_OP_stack_value
-+2:
-+	.quad	0x0	# Location list terminator begin (*.LLST2)
-+	.quad	0x0	# Location list terminator end (*.LLST2)
-+
-+	.section .debug_abbrev
-+.Ldebug_abbrev0:
-+	.uleb128	1			/* Abbrev code */
-+	.uleb128	0x11			/* DW_TAG_compile_unit */
-+	.byte		0x1			/* has_children */
-+	.uleb128	0x25			/* DW_AT_producer */
-+	.uleb128	0xe			/* DW_FORM_strp */
-+	.uleb128	0x13			/* DW_AT_language */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x11			/* DW_AT_low_pc */
-+	.uleb128	0x1			/* DW_FORM_addr */
-+	.uleb128	0x12			/* DW_AT_high_pc */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	2			/* Abbrev code */
-+	.uleb128	0x1			/* TAG: DW_TAG_array_type */
-+	.byte		0x1			/* DW_children_yes */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	3			/* Abbrev code */
-+	.uleb128	0x21			/* DW_TAG_subrange_type */
-+	.byte		0x0			/* no children */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.uleb128	0x22			/* DW_AT_lower_bound */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x2f			/* DW_AT_upper_bound */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	4			/* Abbrev code */
-+	.uleb128	0x24			/* DW_TAG_base_type */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0xe			/* DW_FORM_strp */
-+	.uleb128	0xb			/* DW_AT_byte_size */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x3e			/* DW_AT_encoding */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	5			/* Abbrev code */
-+	.uleb128	0x34			/* DW_TAG_variable */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x34			/* DW_AT_artificial */
-+	.uleb128	0x0c			/* DW_FORM_flag */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.uleb128	0x02			/* DW_AT_location */
-+	.uleb128	0x06			/* DW_FORM_data4 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	6			/* Abbrev code */
-+	.uleb128	0x34			/* DW_TAG_variable */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.uleb128	0x2			/* DW_AT_location */
-+	.uleb128	0xa			/* DW_FORM_block1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	7			/* Abbrev code */
-+	.uleb128	0x34			/* DW_TAG_variable */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x34			/* DW_AT_artificial */
-+	.uleb128	0x0c			/* DW_FORM_flag */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	8			/* Abbrev code */
-+	.uleb128	0x21			/* DW_TAG_subrange_type with block */
-+	.byte		0x0			/* no children */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.uleb128	0x22			/* DW_AT_lower_bound */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x2f			/* DW_AT_upper_bound */
-+	.uleb128	0xa			/* DW_FORM_block1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.byte		0x0			/* Terminator */
-+
-+/* String table */
-+	.section .debug_str
-+.Lproducer:
-+	.string		"GNU C 3.3.3"
-+.Lchar_str:
-+	.string		"char"
-+.Luint_str:
-+	.string		"unsigned int"
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
-@@ -0,0 +1,66 @@
-+# Copyright 2010 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 variable with dynamic bounds which reference a different
-+# (artificial in the GCC case) variable containing loclist as its location.
-+# This testcase uses value (not address) of the referenced variable:
-+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43762
-+
-+# This test can only be run on targets which support DWARF-2 and use gas.
-+# For now pick a sampling of likely targets.
-+if {![istarget *-*-linux*]
-+    && ![istarget *-*-gnu*]
-+    && ![istarget *-*-elf*]
-+    && ![istarget *-*-openbsd*]
-+    && ![istarget arm-*-eabi*]
-+    && ![istarget powerpc-*-eabi*]} {
-+    return 0
-+}
-+
-+set testfile dw2-bound-loclist
-+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {}] } {
-+    return -1
-+}
-+
-+# Verify it behaves at least as an unbound array without inferior.
-+
-+# FIXME: FSF GDB crashes due to !has_stack_frames ().
-+# But in practice that should not happen.
-+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43762
-+#set test "p a_string"
-+#gdb_test_multiple $test $test {
-+#    -re " = 0x\[0-9a-f\]+ \"seennotseen\"\r\n$gdb_prompt $" {
-+#	pass $test
-+#    }
-+#    -re "No registers\\.\r\n$gdb_prompt $" {
-+#	kfail "vlaregression" $test
-+#    }
-+#}
-+#
-+#gdb_test "ptype a_string" {type = char \[variable length\]}
-+
-+# Not runto_main as dw2-bound-loclist.S handles only the first byte of main.
-+if ![runto "*main"] {
-+    return -1
-+}
-+
-+gdb_test "p a_string" { = "seen"}
-+gdb_test "ptype a_string" {type = char \[4\]}
-+
-+gdb_test "p b_string" { = (0x[0-9a-f]+ )?"seennotseen"}
-+gdb_test "ptype b_string" {type = char \[\]}
-+
-+# The register contains unpredictable value - the array size.
-+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.c b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
-@@ -0,0 +1,42 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2004 Free Software Foundation, Inc.
-+
-+   This program is free software; you can 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.  */
-+
-+
-+/* The function `func1' traced into must have debug info on offset > 0;
-+   (DW_UNSND (attr)).  This is the reason of `func0' existence.  */
-+
-+void
-+func0(int a, int b)
-+{
-+}
-+
-+/* `func1' being traced into must have some arguments to dump.  */
-+
-+void
-+func1(int a, int b)
-+{
-+  func0 (a,b);
-+}
-+
-+int
-+main(void)
-+{
-+  func1 (1, 2);
-+  return 0;
-+}
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
-@@ -0,0 +1,84 @@
-+# Copyright 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 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.
-+
-+# Minimal DWARF-2 unit test
-+
-+# This test can only be run on targets which support DWARF-2.
-+# For now pick a sampling of likely targets.
-+if {![istarget *-*-linux*]
-+    && ![istarget *-*-gnu*]
-+    && ![istarget *-*-elf*]
-+    && ![istarget *-*-openbsd*]
-+    && ![istarget arm-*-eabi*]
-+    && ![istarget powerpc-*-eabi*]} {
-+    return 0
-+}
-+
-+if {[use_gdb_stub]} {
-+    untested "skipping test because of use_gdb_stub"
-+    return -1
-+}
-+
-+set testfile "dw2-stripped"
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}.x]
-+
-+remote_exec build "rm -f ${binfile}"
-+
-+# get the value of gcc_compiled
-+if [get_compiler_info ${binfile}] {
-+    return -1
-+}
-+
-+# This test can only be run on gcc as we use additional_flags=FIXME
-+if {$gcc_compiled == 0} {
-+    return 0
-+}
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-ggdb3}] != "" } {
-+    return -1
-+}
-+
-+remote_exec build "objcopy -R .debug_loc ${binfile}"
-+set strip_output [remote_exec build "objdump -h ${binfile}"]
-+
-+set test "stripping test file preservation"
-+if [ regexp ".debug_info " $strip_output]  {
-+    pass "$test (.debug_info preserved)"
-+} else {
-+    fail "$test (.debug_info got also stripped)"
-+}
-+
-+set test "stripping test file functionality"
-+if [ regexp ".debug_loc " $strip_output]  {
-+    fail "$test (.debug_loc still present)"
-+} else {
-+    pass "$test (.debug_loc stripped)"
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+# For C programs, "start" should stop in main().
-+
-+gdb_test "start" \
-+         ".*main \\(\\) at .*" \
-+         "start"
-+gdb_test "step" \
-+         "func.* \\(.*\\) at .*" \
-+         "step"
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
-@@ -0,0 +1,83 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2009 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+
-+/* Debug information */
-+
-+	.section .debug_info
-+.Lcu1_begin:
-+	/* CU header */
-+	.4byte	.Lcu1_end - .Lcu1_start		/* Length of Compilation Unit */
-+.Lcu1_start:
-+	.2byte	2				/* DWARF Version */
-+	.4byte	.Labbrev1_begin			/* Offset into abbrev section */
-+	.byte	4				/* Pointer size */
-+
-+	/* CU die */
-+	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
-+	.ascii	"dw2-struct-member-data-location.c\0"	/* DW_AT_name */
-+	.ascii	"GNU C 4.3.2\0"			/* DW_AT_producer */
-+	.byte	1				/* DW_AT_language (C) */
-+
-+.Ltype_uchar:
-+	.uleb128	2			/* Abbrev: DW_TAG_structure_type */
-+	.ascii		"some_struct\0"		/* DW_AT_name */
-+
-+	.uleb128	3			/* Abbrev: DW_TAG_member */
-+	.ascii		"field\0"		/* DW_AT_name */
-+	.byte		0			/* DW_AT_data_member_location */
-+
-+	.byte		0			/* End of children of some_struct */
-+
-+	.byte		0			/* End of children of CU */
-+
-+.Lcu1_end:
-+
-+/* Abbrev table */
-+	.section .debug_abbrev
-+.Labbrev1_begin:
-+	.uleb128	1			/* Abbrev code */
-+	.uleb128	0x11			/* DW_TAG_compile_unit */
-+	.byte		1			/* has_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x25			/* DW_AT_producer */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x13			/* DW_AT_language */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	2			/* Abbrev code */
-+	.uleb128	0x13			/* DW_TAG_structure_type */
-+	.byte		1			/* has_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	3			/* Abbrev code */
-+	.uleb128	0x0d			/* DW_TAG_member */
-+	.byte		0			/* has_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x38			/* DW_AT_data_member_location */
-+	.uleb128	0x0b			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
-@@ -0,0 +1,37 @@
-+# Copyright 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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 can only be run on targets which support DWARF-2 and use gas.
-+# For now pick a sampling of likely targets.
-+if {![istarget *-*-linux*]
-+    && ![istarget *-*-gnu*]
-+    && ![istarget *-*-elf*]
-+    && ![istarget *-*-openbsd*]
-+    && ![istarget arm-*-eabi*]
-+    && ![istarget powerpc-*-eabi*]} {
-+    return 0
-+}
-+
-+set testfile "dw2-struct-member-data-location"
-+set srcfile ${testfile}.S
-+set binfile ${testfile}.x
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "[standard_output_file ${binfile}]" object {nodebug}] != "" } {
-+    return -1
-+}
-+
-+clean_restart $binfile
-+
-+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
-@@ -0,0 +1,121 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2012 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+
-+/* Debug information */
-+
-+	.section	.data
-+vardata:
-+	.rept		129
-+	.ascii		"x"
-+	.endr
-+	.ascii		"UNSEEN\0"
-+
-+	.section	.debug_info
-+.Lcu1_begin:
-+	.4byte		.Lcu1_end - .Lcu1_start	/* Length of Compilation Unit */
-+.Lcu1_start:
-+	.2byte		2			/* DWARF version number */
-+	.4byte		.Ldebug_abbrev0		/* Offset Into Abbrev. Section */
-+	.byte		4			/* Pointer Size (in bytes) */
-+
-+	/* CU die */
-+	.uleb128	1			/* Abbrev: DW_TAG_compile_unit */
-+	.ascii		"GNU C 3.3.3\0"		/* DW_AT_producer */
-+	.byte		2			/* DW_AT_language (C) -  */
-+
-+.Larray_type:
-+	.uleb128	2			/* Abbrev: DW_TAG_array_type */
-+	.4byte		.Lchar_type-.Lcu1_begin	/* DW_AT_type */
-+
-+	.uleb128	8			/* Abbrev: DW_TAG_subrange_type without DW_AT_type */
-+	.byte		0			/* DW_AT_lower_bound */
-+	.byte		128			/* DW_AT_upper_bound */
-+
-+	.byte		0			/* End of children of die */
-+
-+.Lchar_type:
-+	.uleb128	4			/* Abbrev: DW_TAG_base_type */
-+	.ascii		"char\0"		/* DW_AT_name */
-+	.byte		1			/* DW_AT_byte_size */
-+	.byte		6			/* DW_AT_encoding */
-+
-+	.uleb128	6			/* Abbrev: DW_TAG_variable DW_FORM_string */
-+	.ascii		"notype_string\0"	/* DW_AT_name */
-+	.4byte		.Larray_type-.Lcu1_begin /* DW_AT_type */
-+	.byte		2f - 1f			/* DW_AT_location */
-+1:	.byte		3			/*   DW_OP_addr */
-+	.4byte		vardata			/*   <addr> */
-+2:
-+
-+	.byte		0			/* End of children of CU */
-+.Lcu1_end:
-+
-+	.section .debug_abbrev
-+.Ldebug_abbrev0:
-+	.uleb128	1			/* Abbrev code */
-+	.uleb128	0x11			/* DW_TAG_compile_unit */
-+	.byte		0x1			/* has_children */
-+	.uleb128	0x25			/* DW_AT_producer */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x13			/* DW_AT_language */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	2			/* Abbrev code */
-+	.uleb128	0x1			/* TAG: DW_TAG_array_type */
-+	.byte		0x1			/* DW_children_yes */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	4			/* Abbrev code */
-+	.uleb128	0x24			/* DW_TAG_base_type */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0xb			/* DW_AT_byte_size */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x3e			/* DW_AT_encoding */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	6			/* Abbrev code */
-+	.uleb128	0x34			/* DW_TAG_variable */
-+	.byte		0x0			/* no_children */
-+	.uleb128	0x3			/* DW_AT_name */
-+	.uleb128	0x8			/* DW_FORM_string */
-+	.uleb128	0x49			/* DW_AT_type */
-+	.uleb128	0x13			/* DW_FORM_ref4 */
-+	.uleb128	0x2			/* DW_AT_location */
-+	.uleb128	0xa			/* DW_FORM_block1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.uleb128	8			/* Abbrev code */
-+	.uleb128	0x21			/* DW_TAG_subrange_type without DW_AT_type */
-+	.byte		0x0			/* no children */
-+	.uleb128	0x22			/* DW_AT_lower_bound */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.uleb128	0x2f			/* DW_AT_upper_bound */
-+	.uleb128	0xb			/* DW_FORM_data1 */
-+	.byte		0x0			/* Terminator */
-+	.byte		0x0			/* Terminator */
-+
-+	.byte		0x0			/* Terminator */
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
-@@ -0,0 +1,39 @@
-+# Copyright 2012 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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
-+
-+# https://bugzilla.redhat.com/show_bug.cgi?id=806920
-+# read_subrange_type <TYPE_CODE (base_type) == TYPE_CODE_VOID> reinitialization
-+# of BASE_TYPE was done too late, it affects DW_TAG_subrange_type without
-+# specified DW_AT_type, present only in XLF produced code.
-+
-+# This test can only be run on targets which support DWARF-2 and use gas.
-+if {![dwarf2_support]} {
-+    return 0
-+}
-+
-+set testfile dw2-subrange-no-type
-+set srcfile ${testfile}.S
-+set executable ${testfile}.x
-+set binfile [standard_output_file ${executable}]
-+
-+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-+    return -1
-+}
-+
-+clean_restart $executable
-+
-+gdb_test "ptype notype_string" {type = char \[129\]}
-+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
-diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.exp b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
-@@ -0,0 +1,42 @@
-+# Copyright 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can 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.
-+
-+# This file was written by Jan Kratochvil <jan.kratochvil at redhat.com>.
-+
-+# This file is part of the gdb testsuite.  Array element stride must not be
-+# specified in the number of elements but in a number of bytes instead.
-+# Original problem:
-+# (gdb) p c40pt(1)
-+# $1 = '0-hello', ' ' <repeats 33 times>
-+# (gdb) p c40pt(2)
-+# warning: Fortran array stride not divisible by the element size
-+
-+set testfile dwarf-stride
-+set srcfile ${testfile}.f90
-+
-+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
-+    return -1
-+}
-+
-+if ![runto MAIN__] then {
-+    perror "couldn't run to breakpoint MAIN__"
-+    continue
-+}
-+
-+gdb_breakpoint [gdb_get_line_number "break-here"]
-+gdb_continue_to_breakpoint "break-here" ".*break-here.*"
-+gdb_test "p c40pt(1)" " = '0-hello.*"
-+gdb_test "p c40pt(2)" " = '1-hello.*"
-diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.f90 b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
-@@ -0,0 +1,40 @@
-+! Copyright 2009 Free Software Foundation, Inc.
-+!
-+! This program is free software; you can 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.
-+!
-+! File written by Alan Matsuoka.
-+
-+program repro
-+
-+  type small_stride
-+     character*40 long_string
-+     integer      small_pad
-+  end type small_stride
-+
-+  type(small_stride), dimension (20), target :: unpleasant
-+  character*40, pointer, dimension(:):: c40pt
-+
-+  integer i
-+
-+  do i = 0,19
-+     unpleasant(i+1)%small_pad = i+1
-+     unpleasant(i+1)%long_string = char (ichar('0') + i) // '-hello'
-+  end do
-+
-+  c40pt => unpleasant%long_string
-+
-+  print *, c40pt  ! break-here
-+
-+end program repro
-diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dynamic.exp
-@@ -0,0 +1,154 @@
-+# Copyright 2007 Free Software Foundation, Inc.
-+
-+# This program is free software; you can 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.
-+
-+# This file was written by Jan Kratochvil <jan.kratochvil at redhat.com>.
-+
-+# This file is part of the gdb testsuite.  It contains tests for dynamically
-+# allocated Fortran arrays.
-+# It depends on the GCC dynamic Fortran arrays DWARF support:
-+# 	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22244
-+
-+set testfile "dynamic"
-+set srcfile ${testfile}.f90
-+set binfile [standard_output_file ${testfile}]
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
-+    untested "Couldn't compile ${srcfile}"
-+    return -1
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto MAIN__] then {
-+    perror "couldn't run to breakpoint MAIN__"
-+    continue
-+}
-+
-+gdb_breakpoint [gdb_get_line_number "varx-init"]
-+gdb_continue_to_breakpoint "varx-init"
-+
-+# http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html#5
-+# Do not: gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx unallocated"
-+# Do not: gdb_test "ptype varx" {type = real\(kind=4\) \(:,:,:\)} "ptype varx unallocated"
-+# Do not: gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) unallocated"
-+# Do not: gdb_test "p varx(1,5,17)=1" {no such vector element \(vector not allocated\)} "p varx(1,5,17)=1 unallocated"
-+# Do not: gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) unallocated"
-+
-+gdb_breakpoint [gdb_get_line_number "varx-allocated"]
-+gdb_continue_to_breakpoint "varx-allocated"
-+# $1 = (( ( 0, 0, 0, 0, 0, 0) ( 0, 0, 0, 0, 0, 0) --- , 0) ) ( ( 0, 0, ...) ...) ...)
-+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx allocated"
-+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
-+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varx allocated"
-+
-+gdb_breakpoint [gdb_get_line_number "varx-filled"]
-+gdb_continue_to_breakpoint "varx-filled"
-+gdb_test "p varx(2, 5, 17)" "\\$\[0-9\]* = 6"
-+gdb_test "p varx(1, 5, 17)" "\\$\[0-9\]* = 7"
-+gdb_test "p varx(2, 6, 18)" "\\$\[0-9\]* = 8"
-+gdb_test "p varx(6, 15, 28)" "\\$\[0-9\]* = 9"
-+# http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html#5
-+# Do not: gdb_test "p varv" "\\$\[0-9\]* = <not associated>" "p varv unassociated"
-+# Do not: gdb_test "ptype varv" {type = real\(kind=4\) \(:,:,:\)} "ptype varv unassociated"
-+
-+set test "output varx"
-+gdb_test_multiple $test $test {
-+    -re "^output varx\r\n\[() ,6789.\]*$gdb_prompt $" {
-+	pass $test
-+    }
-+}
-+
-+gdb_breakpoint [gdb_get_line_number "varv-associated"]
-+gdb_continue_to_breakpoint "varv-associated"
-+gdb_test "p varx(3, 7, 19)" "\\$\[0-9\]* = 6" "p varx(3, 7, 19) with varv associated"
-+gdb_test "p varv(3, 7, 19)" "\\$\[0-9\]* = 6" "p varv(3, 7, 19) associated"
-+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
-+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varv associated"
-+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx with varv associated"
-+# Intel Fortran Compiler 10.1.008 uses the pointer type.
-+gdb_test "ptype varv" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)\\)?" "ptype varv associated"
-+
-+gdb_breakpoint [gdb_get_line_number "varv-filled"]
-+gdb_continue_to_breakpoint "varv-filled"
-+gdb_test "p varx(3, 7, 19)" "\\$\[0-9\]* = 10" "p varx(3, 7, 19) with varv filled"
-+gdb_test "p varv(3, 7, 19)" "\\$\[0-9\]* = 10" "p varv(3, 7, 19) filled"
-+
-+gdb_breakpoint [gdb_get_line_number "varv-deassociated"]
-+gdb_continue_to_breakpoint "varv-deassociated"
-+# The latter one is for the Intel Fortran Compiler 10.1.008 pointer type.
-+gdb_test "p varv" "\\$\[0-9\]* = (<not associated>|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "p varv deassociated"
-+gdb_test "ptype varv" {type = real\(kind=4\) \(:,:,:\)} "ptype varv deassociated"
-+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varv deassociated"
-+gdb_test "p varv(1,5,17)" {no such vector element \(vector not associated\)}
-+gdb_test "ptype varv(1,5,17)" {no such vector element \(vector not associated\)}
-+
-+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
-+gdb_continue_to_breakpoint "varx-deallocated"
-+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx deallocated"
-+gdb_test "ptype varx" {type = real\(kind=4\), allocatable \(:,:,:\)} "ptype varx deallocated"
-+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varx deallocated"
-+gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) deallocated"
-+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated"
-+
-+gdb_breakpoint [gdb_get_line_number "vary-passed"]
-+gdb_continue_to_breakpoint "vary-passed"
-+# $1 = (( ( 1, 1, 1, 1, 1, 1) ( 1, 1, 1, 1, 1, 1) --- , 1) ) ( ( 1, 1, ...) ...) ...)
-+gdb_test "p vary" "\\$\[0-9\]* = \\(\[()1, .\]*\\)"
-+
-+gdb_breakpoint [gdb_get_line_number "vary-filled"]
-+gdb_continue_to_breakpoint "vary-filled"
-+gdb_test "ptype vary" "type = real(\\(kind=4\\)|\\*4) \\(10,10\\)"
-+gdb_test "p vary(1, 1)" "\\$\[0-9\]* = 8"
-+gdb_test "p vary(2, 2)" "\\$\[0-9\]* = 9"
-+gdb_test "p vary(1, 3)" "\\$\[0-9\]* = 10"
-+# $1 = (( ( 3, 3, 3, 3, 3, 3) ( 3, 3, 3, 3, 3, 3) --- , 3) ) ( ( 3, 3, ...) ...) ...)
-+gdb_test "p varw" "\\$\[0-9\]* = \\(\[()3, .\]*\\)"
-+
-+gdb_breakpoint [gdb_get_line_number "varw-almostfilled"]
-+gdb_continue_to_breakpoint "varw-almostfilled"
-+gdb_test "ptype varw" "type = real(\\(kind=4\\)|\\*4) \\(5,4,3\\)"
-+gdb_test "p varw(3,1,1)=1" "\\$\[0-9\]* = 1"
-+# $1 = (( ( 6, 5, 1, 5, 5, 5) ( 5, 5, 5, 5, 5, 5) --- , 5) ) ( ( 5, 5, ...) ...) ...)
-+gdb_test "p varw" "\\$\[0-9\]* = \\( *\\( *\\( *6, *5, *1,\[()5, .\]*\\)" "p varw filled"
-+# "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_test "finish" ".*(call bar \\(y, x\\)|call foo \\(x, z\\(2:6, 4:7, 6:8\\)\\))"
-+gdb_test "p z(2,4,5)" "\\$\[0-9\]* = 3"
-+gdb_test "p z(2,4,6)" "\\$\[0-9\]* = 6"
-+gdb_test "p z(2,4,7)" "\\$\[0-9\]* = 5"
-+gdb_test "p z(4,4,6)" "\\$\[0-9\]* = 1"
-+
-+gdb_breakpoint [gdb_get_line_number "varz-almostfilled"]
-+gdb_continue_to_breakpoint "varz-almostfilled"
-+# GCC uses the pointer type here, Intel Fortran Compiler 10.1.008 does not.
-+gdb_test "ptype varz" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(\\*\\)\\)?"
-+# Intel Fortran Compiler 10.1.008 has a bug here - (2:11,7:7)
-+# as it produces DW_AT_lower_bound == DW_AT_upper_bound == 7.
-+gdb_test "ptype vart" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(2:11,7:\\*\\)\\)?"
-+gdb_test "p varz" "\\$\[0-9\]* = \\(\\)"
-+gdb_test "p vart" "\\$\[0-9\]* = \\(\\)"
-+gdb_test "p varz(3)" "\\$\[0-9\]* = 4"
-+# maps to foo::vary(1,1)
-+gdb_test "p vart(2,7)" "\\$\[0-9\]* = 8"
-+# maps to foo::vary(2,2)
-+gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
-+# maps to foo::vary(1,3)
-+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
-diff --git a/gdb/testsuite/gdb.fortran/dynamic.f90 b/gdb/testsuite/gdb.fortran/dynamic.f90
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dynamic.f90
-@@ -0,0 +1,98 @@
-+! Copyright 2007 Free Software Foundation, Inc.
-+!
-+! This program is free software; you can 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.
-+!
-+! Ihis file is the Fortran source file for dynamic.exp.
-+! Original file written by Jakub Jelinek <jakub at redhat.com>.
-+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil at redhat.com>.
-+
-+subroutine baz
-+  real, target, allocatable :: varx (:, :, :)
-+  real, pointer :: varv (:, :, :)
-+  real, target :: varu (1, 2, 3)
-+  logical :: l
-+  allocate (varx (1:6, 5:15, 17:28))            ! varx-init
-+  l = allocated (varx)
-+  varx(:, :, :) = 6                             ! varx-allocated
-+  varx(1, 5, 17) = 7
-+  varx(2, 6, 18) = 8
-+  varx(6, 15, 28) = 9
-+  varv => varx                                  ! varx-filled
-+  l = associated (varv)
-+  varv(3, 7, 19) = 10                           ! varv-associated
-+  varv => null ()                               ! varv-filled
-+  l = associated (varv)
-+  deallocate (varx)                             ! varv-deassociated
-+  l = allocated (varx)
-+  varu(:, :, :) = 10                            ! varx-deallocated
-+  allocate (varv (1:6, 5:15, 17:28))
-+  l = associated (varv)
-+  varv(:, :, :) = 6
-+  varv(1, 5, 17) = 7
-+  varv(2, 6, 18) = 8
-+  varv(6, 15, 28) = 9
-+  deallocate (varv)
-+  l = associated (varv)
-+  varv => varu
-+  varv(1, 1, 1) = 6
-+  varv(1, 2, 3) = 7
-+  l = associated (varv)
-+end subroutine baz
-+subroutine foo (vary, varw)
-+  real :: vary (:, :)
-+  real :: varw (:, :, :)
-+  vary(:, :) = 4                                ! vary-passed
-+  vary(1, 1) = 8
-+  vary(2, 2) = 9
-+  vary(1, 3) = 10
-+  varw(:, :, :) = 5                             ! vary-filled
-+  varw(1, 1, 1) = 6
-+  varw(2, 2, 2) = 7                             ! varw-almostfilled
-+end subroutine foo
-+subroutine bar (varz, vart)
-+  real :: varz (*)
-+  real :: vart (2:11, 7:*)
-+  varz(1:3) = 4
-+  varz(2) = 5                                   ! varz-almostfilled
-+  vart(2,7) = vart(2,7)
-+end subroutine bar
-+program test
-+  interface
-+    subroutine foo (vary, varw)
-+    real :: vary (:, :)
-+    real :: varw (:, :, :)
-+    end subroutine
-+  end interface
-+  interface
-+    subroutine bar (varz, vart)
-+    real :: varz (*)
-+    real :: vart (2:11, 7:*)
-+    end subroutine
-+  end interface
-+  real :: x (10, 10), y (5), z(8, 8, 8)
-+  x(:,:) = 1
-+  y(:) = 2
-+  z(:,:,:) = 3
-+  call baz
-+  call foo (x, z(2:6, 4:7, 6:8))
-+  call bar (y, x)
-+  if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
-+  if (x (1, 3) .ne. 10) call abort
-+  if (z (2, 4, 6) .ne. 6 .or. z (3, 5, 7) .ne. 7 .or. z (2, 4, 7) .ne. 5) call abort
-+  if (any (y .ne. (/4, 5, 4, 2, 2/))) call abort
-+  call foo (transpose (x), z)
-+  if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
-+  if (x (3, 1) .ne. 10) call abort
-+end
-diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/string.exp
-@@ -0,0 +1,71 @@
-+# Copyright 2008 Free Software Foundation, Inc.
-+
-+# This program is free software; you can 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.
-+
-+# This file was written by Jan Kratochvil <jan.kratochvil at redhat.com>.
-+
-+# This file is part of the gdb testsuite.  It contains tests for Fortran
-+# strings with dynamic length.
-+
-+set testfile "string"
-+set srcfile ${testfile}.f90
-+set binfile [standard_output_file ${testfile}]
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
-+    untested "Couldn't compile ${srcfile}"
-+    return -1
-+}
-+
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
-+gdb_load ${binfile}
-+
-+if ![runto MAIN__] then {
-+    perror "couldn't run to breakpoint MAIN__"
-+    continue
-+}
-+
-+gdb_breakpoint [gdb_get_line_number "var-init"]
-+gdb_continue_to_breakpoint "var-init"
-+gdb_test "ptype c" "type = character(\\(kind=1\\)|\\*1)"
-+gdb_test "ptype d" "type = character(\\(kind=8\\)|\\*8)"
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "ptype e" "type = character(\\(kind=4\\)|\\*4)"
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "ptype f" "type = character(\\(kind=4\\)|\\*4) \\(7,8:10\\)"
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "ptype *e" "Attempt to take contents of a non-pointer value."
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "ptype *f" "type = character(\\(kind=4\\)|\\*4) \\(7\\)"
-+gdb_test "p c" "\\$\[0-9\]* = 'c'"
-+gdb_test "p d" "\\$\[0-9\]* = 'd       '"
-+gdb_test "p e" "\\$\[0-9\]* = 'g   '"
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   '\\) \\( 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   '\\) \\( 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   ', 'h   '\\) \\)"
-+gdb_test "p *e" "Attempt to take contents of a non-pointer value."
-+gdb_test "p *f" "Attempt to take contents of a non-pointer value."
-+
-+gdb_breakpoint [gdb_get_line_number "var-finish"]
-+gdb_continue_to_breakpoint "var-finish"
-+gdb_test "p e" "\\$\[0-9\]* = 'e   '" "p e re-set"
-+# Fortran: Support pointers to dynamic types.
-+setup_kfail gdb/nnnnn "*-*-*"
-+gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\( 'f2  ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\( 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\)" "p *f re-set"
-diff --git a/gdb/testsuite/gdb.fortran/string.f90 b/gdb/testsuite/gdb.fortran/string.f90
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/string.f90
-@@ -0,0 +1,37 @@
-+! Copyright 2008 Free Software Foundation, Inc.
-+!
-+! This program is free software; you can 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.
-+!
-+! Ihis file is the Fortran source file for dynamic.exp.
-+! Original file written by Jakub Jelinek <jakub at redhat.com>.
-+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil at redhat.com>.
-+
-+subroutine foo (e, f)
-+  character (len=1) :: c
-+  character (len=8) :: d
-+  character (len=*) :: e
-+  character (len=*) :: f (1:7, 8:10)
-+  c = 'c'
-+  d = 'd'
-+  e = 'e'                                       ! var-init
-+  f = 'f'
-+  f(1,9) = 'f2'
-+  c = 'c'                                       ! var-finish
-+end subroutine foo
-+  character (len=4) :: g, h (1:7, 8:10)
-+  g = 'g'
-+  h = 'h'
-+  call foo (g, h)
-+end
-diff --git a/gdb/testsuite/gdb.fortran/subrange.exp b/gdb/testsuite/gdb.fortran/subrange.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/subrange.exp
-@@ -0,0 +1,72 @@
-+# Copyright 2011 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# 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_fortran_tests] } { return -1 }
-+
-+set testfile "subrange"
-+set srcfile ${testfile}.f90
-+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
-+    return -1
-+}
-+
-+if ![runto MAIN__] {
-+    perror "Couldn't run to 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\\))"
-+
-+gdb_breakpoint [gdb_get_line_number "break-static"]
-+gdb_continue_to_breakpoint "break-static" ".*break-static.*"
-+
-+foreach var {a alloc ptr} {
-+    global pf_prefix
-+    set old_prefix $pf_prefix
-+    lappend pf_prefix "$var:"
-+
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (2, 2:3)" { = \(22, 32\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (2:3, 3)" { = \(32, 33\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (1, 2:)" { = \(21, 31\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (2, :2)" { = \(12, 22\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (3, 2:2)" { = \(23\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "ptype $var (3, 2:2)" " = $int4 \\(2:2\\)"
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (4, :)" { = \(14, 24, 34\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (:, :)" { = \(\( *11, 12, 13, 14\) \( *21, 22, 23, 24\) \( *31, 32, 33, 34\) *\)}
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "ptype $var (:, :)" " = $int4 \\(4,3\\)"
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (:)" "Wrong number of subscripts"
-+    setup_kfail "*-*-*" "vlaregression/9999"
-+    gdb_test "p $var (:, :, :)" "Wrong number of subscripts"
-+
-+    set pf_prefix $old_prefix
-+}
-+
-+gdb_test_no_output {set $a=a}
-+delete_breakpoints
-+gdb_unload
-+setup_kfail "*-*-*" "vlaregression/9999"
-+gdb_test {p $a (3, 2:2)} { = \(23\)}
-diff --git a/gdb/testsuite/gdb.fortran/subrange.f90 b/gdb/testsuite/gdb.fortran/subrange.f90
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/subrange.f90
-@@ -0,0 +1,28 @@
-+! Copyright 2011 Free Software Foundation, Inc.
-+!
-+! This program is free software; you can redistribute it and/or modify
-+! it under the terms of the GNU General Public License as published by
-+! the Free Software Foundation; either version 3 of the License, or
-+! (at your option) any later version.
-+!
-+! This program is distributed in the hope that it will be useful,
-+! but WITHOUT ANY WARRANTY; without even the implied warranty of
-+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+! GNU General Public License for more details.
-+!
-+! 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 test
-+  integer, target :: a (4, 3)
-+  integer, allocatable :: alloc (:, :)
-+  integer, pointer :: ptr (:, :)
-+  do 1 i = 1, 4
-+  do 1 j = 1, 3
-+    a (i, j) = j * 10 + i
-+1 continue
-+  allocate (alloc (4, 3))
-+  alloc = a
-+  ptr => a
-+  write (*,*) a                 ! break-static
-+end
-diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.c b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
-@@ -0,0 +1,26 @@
-+/* Copyright 2011 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
<Skipped 2465 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gdb.git/commitdiff/1d2a824d36aa62f22847c52fab8249be5a536a0c



More information about the pld-cvs-commit mailing list