summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-10-15 14:19:43 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-10-15 14:19:43 -0700
commit12131234750c1f8743bead5c6cb1eb5d6af61d32 (patch)
tree45f92b148250974d7c751ae474387d736a4ae8a4
parent978c07fd9d5b0792ec9c2be54cbdcc899265439f (diff)
parent5164ec17af2b8a66674aaf0ee013ed9d71fa383e (diff)
downloadgdb-hjl/x32/master.tar.gz
Merge remote-tracking branch 'origin/master' into hjl/x32/masterhjl/x32/master
-rw-r--r--ChangeLog5
-rw-r--r--bfd/ChangeLog19
-rw-r--r--bfd/Makefile.am2
-rw-r--r--bfd/Makefile.in3
-rwxr-xr-xbfd/configure6
-rw-r--r--bfd/configure.in1
-rw-r--r--bfd/elf.c57
-rw-r--r--bfd/version.h2
-rwxr-xr-xconfig.guess64
-rwxr-xr-xconfig.sub26
-rw-r--r--gdb/ChangeLog86
-rw-r--r--gdb/buildsym.c1
-rwxr-xr-xgdb/configure14
-rw-r--r--gdb/configure.ac14
-rw-r--r--gdb/dwarf2loc.c19
-rw-r--r--gdb/dwarf2read.c36
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/server.c9
-rw-r--r--gdb/linespec.c22
-rw-r--r--gdb/ppc-linux-tdep.c5
-rw-r--r--gdb/python/py-symbol.c2
-rw-r--r--gdb/python/py-symtab.c5
-rw-r--r--gdb/remote-sim.c37
-rw-r--r--gdb/rs6000-nat.c1
-rw-r--r--gdb/target.c8
-rw-r--r--gdb/testsuite/ChangeLog125
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-inline.S672
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-inline.c50
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp40
-rw-r--r--gdb/testsuite/gdb.arch/i386-avx.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-bp_permanent.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-byte.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-disp-step.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-gnu-cfi.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-size-overlap.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-size.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-sse.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.exp2
-rw-r--r--gdb/testsuite/gdb.arch/i386-word.exp2
-rw-r--r--gdb/testsuite/gdb.base/find-unmapped.c106
-rw-r--r--gdb/testsuite/gdb.base/find-unmapped.exp46
-rw-r--r--gdb/testsuite/gdb.base/step-symless.c38
-rw-r--r--gdb/testsuite/gdb.base/step-symless.exp41
-rw-r--r--gdb/testsuite/gdb.cp/using-crash.cc43
-rw-r--r--gdb/testsuite/gdb.cp/using-crash.exp (renamed from gdb/testsuite/gdb.mi/mi2-hack-cli.exp)36
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S2
-rw-r--r--gdb/testsuite/gdb.java/jmisc.exp4
-rw-r--r--gdb/testsuite/gdb.java/jprint.exp4
-rw-r--r--gdb/testsuite/gdb.linespec/ls-errs.exp2
-rw-r--r--gdb/testsuite/gdb.linespec/thread.c31
-rw-r--r--gdb/testsuite/gdb.linespec/thread.exp41
-rw-r--r--gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp6
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp (renamed from gdb/testsuite/gdb.mi/mi2-cli.exp)6
-rw-r--r--gdb/testsuite/gdb.mi/mi2-basics.exp229
-rw-r--r--gdb/testsuite/gdb.mi/mi2-break.exp157
-rw-r--r--gdb/testsuite/gdb.mi/mi2-console.exp78
-rw-r--r--gdb/testsuite/gdb.mi/mi2-disassemble.exp238
-rw-r--r--gdb/testsuite/gdb.mi/mi2-eval.exp61
-rw-r--r--gdb/testsuite/gdb.mi/mi2-file.exp73
-rw-r--r--gdb/testsuite/gdb.mi/mi2-pthreads.exp71
-rw-r--r--gdb/testsuite/gdb.mi/mi2-read-memory.exp82
-rw-r--r--gdb/testsuite/gdb.mi/mi2-regs.exp121
-rw-r--r--gdb/testsuite/gdb.mi/mi2-return.exp66
-rw-r--r--gdb/testsuite/gdb.mi/mi2-simplerun.exp189
-rw-r--r--gdb/testsuite/gdb.mi/mi2-stack.exp210
-rw-r--r--gdb/testsuite/gdb.mi/mi2-stepi.exp77
-rw-r--r--gdb/testsuite/gdb.mi/mi2-syn-frame.exp101
-rw-r--r--gdb/testsuite/gdb.mi/mi2-until.exp84
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-block.exp173
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-cmd.exp529
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-display.exp631
-rw-r--r--gdb/testsuite/gdb.mi/mi2-watch.exp186
-rw-r--r--gdb/testsuite/gdb.python/py-symbol.exp1
-rw-r--r--gdb/testsuite/gdb.python/py-symtab.exp3
-rw-r--r--gdb/testsuite/lib/gdb.exp142
-rw-r--r--gdb/version.in2
-rw-r--r--include/ChangeLog10
-rw-r--r--include/demangle.h3
-rw-r--r--include/objalloc.h4
-rw-r--r--include/opcode/ChangeLog9
-rw-r--r--include/opcode/hppa.h8
-rw-r--r--include/opcode/s390.h1
-rw-r--r--libiberty/ChangeLog23
-rw-r--r--libiberty/Makefile.in25
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure13
-rw-r--r--libiberty/configure.ac8
-rw-r--r--libiberty/cp-demangle.c26
-rw-r--r--libiberty/functions.texi70
-rw-r--r--libiberty/maint-tool2
-rw-r--r--libiberty/objalloc.c11
-rw-r--r--libiberty/strnlen.c30
-rw-r--r--opcodes/ChangeLog43
-rw-r--r--opcodes/aarch64-opc.c9
-rw-r--r--opcodes/arm-dis.c10
-rw-r--r--opcodes/i386-gen.c2
-rw-r--r--opcodes/i386-init.h6
-rw-r--r--opcodes/ppc-dis.c2
-rw-r--r--opcodes/ppc-opc.c13
-rw-r--r--opcodes/s390-mkopc.c5
-rw-r--r--opcodes/s390-opc.c74
-rw-r--r--opcodes/s390-opc.txt39
-rw-r--r--opcodes/v850-dis.c16
-rw-r--r--sim/mips/ChangeLog5
-rw-r--r--sim/mips/mips3264r2.igen11
107 files changed, 2117 insertions, 3642 deletions
diff --git a/ChangeLog b/ChangeLog
index 469651a7878..59f4f7f0ee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-10 David Holsgrove <david.holsgrove@xilinx.com>
+
+ * config.guess, config.sub: Include updated version from
+ config-patches. Adds microblaze little endian support.
+
2012-09-28 Ian Lance Taylor <iant@google.com>
* Makefile.def: Make all-target-libgo depend on
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4c3e181cb4e..57c7e173bc4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,20 @@
+2012-10-15 Doug Evans <dje@google.com>
+
+ * elf.c (special_sections_d): Add comment.
+
+2012-10-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
+ * configure.in (lt_cv_dlopen_libs): AC_SUBST.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+
+2012-10-08 Alan Modra <amodra@gmail.com>
+
+ PR binutils/14662
+ * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
+ SEC_DEBUGGING.
+
2012-09-20 Walter Lee <walt@tilera.com>
* elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
@@ -11,7 +28,7 @@
2012-09-18 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14591
- * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
+ * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
if the old symbol is weak.
* elf32-sh-symbian.c (sh_symbian_relocate_section): Update
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 49f9662272f..2ac03e9577c 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -35,7 +35,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
if PLUGINS
bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
-LIBDL = -ldl
+LIBDL = @lt_cv_dlopen_libs@
endif
# bfd.h goes here, for now
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 5718fab60c3..7b0f8637e47 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -293,6 +293,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -336,7 +337,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
-@PLUGINS_TRUE@LIBDL = -ldl
+@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
# bfd.h goes here, for now
BFD_H = bfd.h
diff --git a/bfd/configure b/bfd/configure
index d81719d3284..fdf5356bc00 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -606,6 +606,7 @@ havevecs
tdefaults
bfd_ufile_ptr
bfd_file_ptr
+lt_cv_dlopen_libs
supports_plugins
bfd_default_target_size
bfd_machines
@@ -11414,7 +11415,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11417 "configure"
+#line 11418 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11520,7 +11521,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11523 "configure"
+#line 11524 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15633,6 +15634,7 @@ else
fi
+
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
diff --git a/bfd/configure.in b/bfd/configure.in
index 612d032fb3f..530bbcb348d 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -1100,6 +1100,7 @@ else
supports_plugins=0
fi
AC_SUBST(supports_plugins)
+AC_SUBST(lt_cv_dlopen_libs)
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
diff --git a/bfd/elf.c b/bfd/elf.c
index b4043b12928..f01480bf836 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -880,45 +880,25 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
{
/* The debugging sections appear to be recognized only by name,
not any sort of flag. Their SEC_ALLOC bits are cleared. */
- static const struct
- {
- const char *name;
- int len;
- } debug_sections [] =
- {
- { STRING_COMMA_LEN ("debug") }, /* 'd' */
- { NULL, 0 }, /* 'e' */
- { NULL, 0 }, /* 'f' */
- { STRING_COMMA_LEN ("gnu.linkonce.wi.") }, /* 'g' */
- { NULL, 0 }, /* 'h' */
- { NULL, 0 }, /* 'i' */
- { NULL, 0 }, /* 'j' */
- { NULL, 0 }, /* 'k' */
- { STRING_COMMA_LEN ("line") }, /* 'l' */
- { NULL, 0 }, /* 'm' */
- { NULL, 0 }, /* 'n' */
- { NULL, 0 }, /* 'o' */
- { NULL, 0 }, /* 'p' */
- { NULL, 0 }, /* 'q' */
- { NULL, 0 }, /* 'r' */
- { STRING_COMMA_LEN ("stab") }, /* 's' */
- { NULL, 0 }, /* 't' */
- { NULL, 0 }, /* 'u' */
- { NULL, 0 }, /* 'v' */
- { NULL, 0 }, /* 'w' */
- { NULL, 0 }, /* 'x' */
- { NULL, 0 }, /* 'y' */
- { STRING_COMMA_LEN ("zdebug") } /* 'z' */
- };
-
if (name [0] == '.')
{
- int i = name [1] - 'd';
- if (i >= 0
- && i < (int) ARRAY_SIZE (debug_sections)
- && debug_sections [i].name != NULL
- && strncmp (&name [1], debug_sections [i].name,
- debug_sections [i].len) == 0)
+ const char *p;
+ int n;
+ if (name[1] == 'd')
+ p = ".debug", n = 6;
+ else if (name[1] == 'g' && name[2] == 'n')
+ p = ".gnu.linkonce.wi.", n = 17;
+ else if (name[1] == 'g' && name[2] == 'd')
+ p = ".gdb_index", n = 11; /* yes we really do mean 11. */
+ else if (name[1] == 'l')
+ p = ".line", n = 5;
+ else if (name[1] == 's')
+ p = ".stab", n = 5;
+ else if (name[1] == 'z')
+ p = ".zdebug", n = 7;
+ else
+ p = NULL, n = 0;
+ if (p != NULL && strncmp (name, p, n) == 0)
flags |= SEC_DEBUGGING;
}
}
@@ -2081,6 +2061,9 @@ static const struct bfd_elf_special_section special_sections_d[] =
{
{ STRING_COMMA_LEN (".data"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ STRING_COMMA_LEN (".data1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ /* There are more DWARF sections than these, but they needn't be added here
+ unless you have to cope with broken compilers that don't emit section
+ attributes or you want to help the user writing assembler. */
{ STRING_COMMA_LEN (".debug"), 0, SHT_PROGBITS, 0 },
{ STRING_COMMA_LEN (".debug_line"), 0, SHT_PROGBITS, 0 },
{ STRING_COMMA_LEN (".debug_info"), 0, SHT_PROGBITS, 0 },
diff --git a/bfd/version.h b/bfd/version.h
index d79ddf07685..a9c10eff426 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20120930
+#define BFD_VERSION_DATE 20121015
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/config.guess b/config.guess
index b02565c7b2f..872b96a161e 100755
--- a/config.guess
+++ b/config.guess
@@ -2,9 +2,9 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2011-06-03'
+timestamp='2012-09-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2011-06-03'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +306,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -792,21 +794,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -861,6 +868,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -895,13 +909,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@@ -943,7 +960,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -984,7 +1001,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1191,6 +1208,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1246,7 +1266,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1315,11 +1335,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/config.sub b/config.sub
index 59bb593f109..826e4c6bb56 100755
--- a/config.sub
+++ b/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-04-18'
+timestamp='2012-10-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -123,7 +123,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
@@ -156,7 +156,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -273,7 +273,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -389,7 +389,8 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -788,9 +789,13 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1352,15 +1357,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1543,6 +1548,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b5aeda17f02..a2c457ef949 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,89 @@
+2012-10-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR backtrace/14646
+ PR gdb/14647
+ * i386-tdep.h (gdbarch_tdep): Remove sp_regnum_from_eax and
+ pc_regnum_from_eax.
+ * i386-tdep.c (i386_gdbarch_init): Don't use sp_regnum_from_eax
+ nor pc_regnum_from_eax.
+ * amd64-tdep.c (amd64_x32_init_abi): Don't set sp_regnum_from_eax
+ nor pc_regnum_from_eax.
+
+2012-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix entry values resolving in inlined frames.
+ * dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Move func_addr,
+ gdbarch and caller_frame initialization later. Skip INLINE_FRAME
+ entries of FRAME.
+
+2012-10-15 Joel Brobecker <brobecker@adacore.com>
+
+ * configure.ac: Build with -DMS_WIN64 if building with Python
+ enabled using GCC on amd64-windows.
+ * configure: Regenerate.
+
+2012-10-15 Tom Tromey <tromey@redhat.com>
+
+ PR python/14635:
+ * python/py-symtab.c (del_objfile_sal): Set 'symtab' field
+ to Py_None.
+
+2012-10-15 Tom Tromey <tromey@redhat.com>
+
+ PR python/14634:
+ * python/py-symbol.c (sympy_dealloc): Check for NULL symbol.
+
+2012-10-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * remote-sim.c (gdbsim_create_inferior): Call init_thread_list to
+ reset thread numbering back to 1.
+
+2012-10-11 Doug Evans <dje@google.com>
+
+ PR breakpoints/14643.
+ * linespec.c (struct ls_parser): New member keyword_ok.
+ (linespec_lexer_lex_string): Add comment.
+ (linespec_lexer_lex_one): Ignore keywords if it's the wrong place
+ for one.
+ (parse_linespec): Set keyword_ok.
+
+2012-10-10 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (process_psymtab_comp_unit_reader): Remove duplicate
+ "0x" prefix on address in log message.
+
+ * dwarf2read.c (read_1_byte): Add const to buf parameter.
+ (read_1_signed_byte, read_2_bytes, read_2_signed_bytes): Ditto.
+ (read_4_bytes, read_4_signed_bytes, read_8_bytes): Ditto.
+ (lookup_dwo_file): Add const to dwo_name parameter.
+ (lookup_dwo_comp_unit, lookup_dwo_type_unit): Ditto.
+
+2012-10-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix crash during stepping on ppc32.
+ * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL
+ SYM.
+
+2012-10-03 Doug Evans <dje@google.com>
+
+ PR symtab/14601
+ * buildsym.c (buildsym_init): Reset using_directives to NULL.
+
+2012-10-02 Andrew Burgess <aburgess@broadcom.com>
+
+ * remote-sim.c (dump_mem): Always dump buffer contents, zero fill
+ output and use uint32_t not long to ensure 4 byte size.
+
+2012-10-02 Joel Brobecker <brobecker@adacore.com>
+
+ * rs6000-nat.c (add_vmap): Set "last" to "next" after having
+ unref'ed it.
+
+2012-10-01 Andrew Burgess <aburgess@broadcom.com>
+
+ * target.c (simple_search_memory): Include access length in
+ warning message.
+
2012-09-28 Nathan Miller <nathanm2@us.ibm.com>
Edjunior Machado <emachado@linux.vnet.ibm.com>
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 1ce40b9d868..8f2e7327aff 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1488,6 +1488,7 @@ buildsym_init (void)
global_symbols = NULL;
pending_blocks = NULL;
pending_macros = NULL;
+ using_directives = NULL;
/* We shouldn't have any address map at this point. */
gdb_assert (! pending_addrmap);
diff --git a/gdb/configure b/gdb/configure
index d913de6e7ef..6941e9c0560 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8472,11 +8472,25 @@ $as_echo "${PYTHON_CFLAGS}" >&6; }
# unilaterally defined, and that in turn causes _SGIAPI to evaluate
# to false. So, we work around this issue by defining siginfo ourself
# though the command-line.
+ #
+ # On x64 Windows, Python's include headers, and pyconfig.h in
+ # particular, rely on MS_WIN64 macro to detect that it's a 64bit
+ # version of Windows. Unfortunately, MS_WIN64 is only defined if
+ # _MSC_VER, a Microsoft-specific macro, is defined. So, when
+ # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
+ # The issue was reported to the Python community, but still isn't
+ # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
+
case "$gdb_host" in
irix*) if test "${GCC}" = yes; then
CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
fi
;;
+ mingw64)
+ if test "${GCC}" = yes; then
+ CPPFLAGS="$CPPFLAGS -DMS_WIN64"
+ fi
+ ;;
esac
# Note that "python -m threading" cannot be used to check for
diff --git a/gdb/configure.ac b/gdb/configure.ac
index c0fd0e13b8d..fc181fd5e36 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -989,11 +989,25 @@ if test "${have_libpython}" != no; then
# unilaterally defined, and that in turn causes _SGIAPI to evaluate
# to false. So, we work around this issue by defining siginfo ourself
# though the command-line.
+ #
+ # On x64 Windows, Python's include headers, and pyconfig.h in
+ # particular, rely on MS_WIN64 macro to detect that it's a 64bit
+ # version of Windows. Unfortunately, MS_WIN64 is only defined if
+ # _MSC_VER, a Microsoft-specific macro, is defined. So, when
+ # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
+ # The issue was reported to the Python community, but still isn't
+ # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
+
case "$gdb_host" in
irix*) if test "${GCC}" = yes; then
CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
fi
;;
+ mingw64)
+ if test "${GCC}" = yes; then
+ CPPFLAGS="$CPPFLAGS -DMS_WIN64"
+ fi
+ ;;
esac
# Note that "python -m threading" cannot be used to check for
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index e8d39feb8e4..0bdc0427af1 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -980,16 +980,27 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame,
union call_site_parameter_u kind_u,
struct dwarf2_per_cu_data **per_cu_return)
{
- CORE_ADDR func_addr = get_frame_func (frame);
- CORE_ADDR caller_pc;
- struct gdbarch *gdbarch = get_frame_arch (frame);
- struct frame_info *caller_frame = get_prev_frame (frame);
+ CORE_ADDR func_addr, caller_pc;
+ struct gdbarch *gdbarch;
+ struct frame_info *caller_frame;
struct call_site *call_site;
int iparams;
/* Initialize it just to avoid a GCC false warning. */
struct call_site_parameter *parameter = NULL;
CORE_ADDR target_addr;
+ /* Skip any inlined frames, entry value call sites work between real
+ functions. They do not make sense between inline functions as even PC
+ does not change there. */
+ while (get_frame_type (frame) == INLINE_FRAME)
+ {
+ frame = get_prev_frame (frame);
+ gdb_assert (frame != NULL);
+ }
+
+ func_addr = get_frame_func (frame);
+ gdbarch = get_frame_arch (frame);
+ caller_frame = get_prev_frame (frame);
if (gdbarch != frame_unwind_arch (frame))
{
struct minimal_symbol *msym = lookup_minimal_symbol_by_pc (func_addr);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 009be3c890f..2dcba207645 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1237,15 +1237,15 @@ static gdb_byte *read_attribute (const struct die_reader_specs *,
struct attribute *, struct attr_abbrev *,
gdb_byte *);
-static unsigned int read_1_byte (bfd *, gdb_byte *);
+static unsigned int read_1_byte (bfd *, const gdb_byte *);
-static int read_1_signed_byte (bfd *, gdb_byte *);
+static int read_1_signed_byte (bfd *, const gdb_byte *);
-static unsigned int read_2_bytes (bfd *, gdb_byte *);
+static unsigned int read_2_bytes (bfd *, const gdb_byte *);
-static unsigned int read_4_bytes (bfd *, gdb_byte *);
+static unsigned int read_4_bytes (bfd *, const gdb_byte *);
-static ULONGEST read_8_bytes (bfd *, gdb_byte *);
+static ULONGEST read_8_bytes (bfd *, const gdb_byte *);
static CORE_ADDR read_address (bfd *, gdb_byte *ptr, struct dwarf2_cu *,
unsigned int *);
@@ -1623,10 +1623,10 @@ static htab_t allocate_signatured_type_table (struct objfile *objfile);
static htab_t allocate_dwo_unit_table (struct objfile *objfile);
static struct dwo_unit *lookup_dwo_comp_unit
- (struct dwarf2_per_cu_data *, char *, const char *, ULONGEST);
+ (struct dwarf2_per_cu_data *, const char *, const char *, ULONGEST);
static struct dwo_unit *lookup_dwo_type_unit
- (struct signatured_type *, char *, const char *);
+ (struct signatured_type *, const char *, const char *);
static void free_dwo_file_cleanup (void *);
@@ -4859,7 +4859,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
struct gdbarch *gdbarch = get_objfile_arch (objfile);
fprintf_unfiltered (gdb_stdlog,
- "Psymtab for %s unit @0x%x: 0x%s - 0x%s"
+ "Psymtab for %s unit @0x%x: %s - %s"
", %d global, %d static syms\n",
per_cu->is_debug_types ? "type" : "comp",
per_cu->offset.sect_off,
@@ -8373,7 +8373,7 @@ init_dwo_file (const char *dwo_name, const char *comp_dir)
/* Lookup DWO file DWO_NAME. */
static struct dwo_file *
-lookup_dwo_file (char *dwo_name, const char *comp_dir)
+lookup_dwo_file (const char *dwo_name, const char *comp_dir)
{
struct dwo_file *dwo_file;
struct dwo_file find_entry;
@@ -8405,7 +8405,7 @@ lookup_dwo_file (char *dwo_name, const char *comp_dir)
static struct dwo_unit *
lookup_dwo_comp_unit (struct dwarf2_per_cu_data *this_cu,
- char *dwo_name, const char *comp_dir,
+ const char *dwo_name, const char *comp_dir,
ULONGEST signature)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
@@ -8444,7 +8444,7 @@ lookup_dwo_comp_unit (struct dwarf2_per_cu_data *this_cu,
static struct dwo_unit *
lookup_dwo_type_unit (struct signatured_type *this_tu,
- char *dwo_name, const char *comp_dir)
+ const char *dwo_name, const char *comp_dir)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwo_file *dwo_file;
@@ -13397,43 +13397,43 @@ read_attribute (const struct die_reader_specs *reader,
/* Read dwarf information from a buffer. */
static unsigned int
-read_1_byte (bfd *abfd, gdb_byte *buf)
+read_1_byte (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_8 (abfd, buf);
}
static int
-read_1_signed_byte (bfd *abfd, gdb_byte *buf)
+read_1_signed_byte (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_signed_8 (abfd, buf);
}
static unsigned int
-read_2_bytes (bfd *abfd, gdb_byte *buf)
+read_2_bytes (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_16 (abfd, buf);
}
static int
-read_2_signed_bytes (bfd *abfd, gdb_byte *buf)
+read_2_signed_bytes (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_signed_16 (abfd, buf);
}
static unsigned int
-read_4_bytes (bfd *abfd, gdb_byte *buf)
+read_4_bytes (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_32 (abfd, buf);
}
static int
-read_4_signed_bytes (bfd *abfd, gdb_byte *buf)
+read_4_signed_bytes (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_signed_32 (abfd, buf);
}
static ULONGEST
-read_8_bytes (bfd *abfd, gdb_byte *buf)
+read_8_bytes (bfd *abfd, const gdb_byte *buf)
{
return bfd_get_64 (abfd, buf);
}
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 672a87df9f5..8bfbe9cb510 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-01 Andrew Burgess <aburgess@broadcom.com>
+
+ * server.c (handle_search_memory_1): Include access length in
+ warning message.
+
2012-09-05 Michael Brandt <michael.brandt@axis.com>
* linux-crisv32-low.c: Fix compile errors.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 547552f94dc..61a73130415 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -735,8 +735,9 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
if (gdb_read_memory (start_addr, search_buf, search_buf_size)
!= search_buf_size)
{
- warning ("Unable to access target memory at 0x%lx, halting search.",
- (long) start_addr);
+ warning ("Unable to access %ld bytes of target "
+ "memory at 0x%lx, halting search.",
+ (long) search_buf_size, (long) start_addr);
return -1;
}
@@ -787,9 +788,9 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
if (gdb_read_memory (read_addr, search_buf + keep_len,
nr_to_read) != search_buf_size)
{
- warning ("Unable to access target memory "
+ warning ("Unable to access %ld bytes of target memory "
"at 0x%lx, halting search.",
- (long) read_addr);
+ (long) nr_to_read, (long) read_addr);
return -1;
}
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 3edc09f12c0..06634d28394 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -286,6 +286,11 @@ struct ls_parser
/* Is the entire linespec quote-enclosed? */
int is_quote_enclosed;
+ /* Is a keyword syntactically valid at this point?
+ In, e.g., "break thread thread 1", the leading "keyword" must not
+ be interpreted as such. */
+ int keyword_ok;
+
/* The state of the parse. */
struct linespec_state state;
#define PARSER_STATE(PPTR) (&(PPTR)->state)
@@ -607,6 +612,10 @@ linespec_lexer_lex_string (linespec_parser *parser)
if (isspace (*PARSER_STREAM (parser)))
{
p = skip_spaces (PARSER_STREAM (parser));
+ /* When we get here we know we've found something followed by
+ a space (we skip over parens and templates below).
+ So if we find a keyword now, we know it is a keyword and not,
+ say, a function name. */
if (linespec_lexer_lex_keyword (p) != NULL)
{
LS_TOKEN_STOKEN (token).ptr = start;
@@ -716,8 +725,10 @@ linespec_lexer_lex_one (linespec_parser *parser)
/* Skip any whitespace. */
PARSER_STREAM (parser) = skip_spaces (PARSER_STREAM (parser));
- /* Check for a keyword. */
- keyword = linespec_lexer_lex_keyword (PARSER_STREAM (parser));
+ /* Check for a keyword, they end the linespec. */
+ keyword = NULL;
+ if (parser->keyword_ok)
+ keyword = linespec_lexer_lex_keyword (PARSER_STREAM (parser));
if (keyword != NULL)
{
parser->lexer.current.type = LSTOKEN_KEYWORD;
@@ -2024,6 +2035,10 @@ parse_linespec (linespec_parser *parser, char **argptr)
}
}
+ /* A keyword at the start cannot be interpreted as such.
+ Consider "b thread thread 42". */
+ parser->keyword_ok = 0;
+
parser->lexer.saved_arg = *argptr;
parser->lexer.stream = argptr;
file_exception.reason = 0;
@@ -2098,6 +2113,9 @@ parse_linespec (linespec_parser *parser, char **argptr)
else if (token.type != LSTOKEN_STRING && token.type != LSTOKEN_NUMBER)
unexpected_linespec_error (parser);
+ /* Now we can recognize keywords. */
+ parser->keyword_ok = 1;
+
/* Shortcut: If the next token is not LSTOKEN_COLON, we know that
this token cannot represent a filename. */
token = linespec_lexer_peek_token (parser);
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c7b70dbe38c..ccded83f11a 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -648,8 +648,9 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
/* Check if we are in the resolver. */
sym = lookup_minimal_symbol_by_pc (pc);
- if ((strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0)
- || (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
+ if (sym != NULL
+ && (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0
+ || strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
return 1;
return 0;
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 00a84777a49..83d272e65de 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -335,7 +335,7 @@ sympy_dealloc (PyObject *obj)
if (sym_obj->prev)
sym_obj->prev->next = sym_obj->next;
- else if (SYMBOL_SYMTAB (sym_obj->symbol))
+ else if (sym_obj->symbol && SYMBOL_SYMTAB (sym_obj->symbol))
{
set_objfile_data (SYMBOL_SYMTAB (sym_obj->symbol)->objfile,
sympy_objfile_data_key, sym_obj->next);
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index b6f45e6d8d8..21a172cadd8 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -470,7 +470,10 @@ del_objfile_sal (struct objfile *objfile, void *datum)
{
sal_object *next = obj->next;
- obj->symtab = NULL;
+ Py_DECREF (obj->symtab);
+ obj->symtab = (symtab_object *) Py_None;
+ Py_INCREF (Py_None);
+
obj->next = NULL;
obj->prev = NULL;
xfree (obj->sal);
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index d87f66842b7..adc77e7bc1b 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -273,28 +273,26 @@ sim_inferior_data_cleanup (struct inferior *inf, void *data)
static void
dump_mem (char *buf, int len)
{
- if (len <= 8)
+ printf_filtered ("\t");
+
+ if (len == 8 || len == 4)
{
- if (len == 8 || len == 4)
- {
- long l[2];
+ uint32_t l[2];
- memcpy (l, buf, len);
- printf_filtered ("\t0x%lx", l[0]);
- if (len == 8)
- printf_filtered (" 0x%lx", l[1]);
- printf_filtered ("\n");
- }
- else
- {
- int i;
+ memcpy (l, buf, len);
+ printf_filtered ("0x%08x", l[0]);
+ if (len == 8)
+ printf_filtered (" 0x%08x", l[1]);
+ }
+ else
+ {
+ int i;
- printf_filtered ("\t");
- for (i = 0; i < len; i++)
- printf_filtered ("0x%x ", buf[i]);
- printf_filtered ("\n");
- }
+ for (i = 0; i < len; i++)
+ printf_filtered ("0x%02x ", buf[i]);
}
+
+ printf_filtered ("\n");
}
/* Initialize gdb_callback. */
@@ -642,6 +640,9 @@ gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args,
else
argv = NULL;
+ if (!have_inferiors ())
+ init_thread_list ();
+
if (sim_create_inferior (sim_data->gdbsim_desc, exec_bfd, argv, env)
!= SIM_RC_OK)
error (_("Unable to create sim inferior."));
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 3eb2cd70993..2d2df5bce2d 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -771,6 +771,7 @@ add_vmap (LdInfo *ldi)
next = gdb_bfd_openr_next_archived_file (abfd, last);
gdb_bfd_unref (last);
+ last = next;
}
if (!last)
diff --git a/gdb/target.c b/gdb/target.c
index 1fc88028413..861e6a62c7d 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2874,8 +2874,9 @@ simple_search_memory (struct target_ops *ops,
if (target_read (ops, TARGET_OBJECT_MEMORY, NULL,
search_buf, start_addr, search_buf_size) != search_buf_size)
{
- warning (_("Unable to access target memory at %s, halting search."),
- hex_string (start_addr));
+ warning (_("Unable to access %s bytes of target "
+ "memory at %s, halting search."),
+ pulongest (search_buf_size), hex_string (start_addr));
do_cleanups (old_cleanups);
return -1;
}
@@ -2928,8 +2929,9 @@ simple_search_memory (struct target_ops *ops,
search_buf + keep_len, read_addr,
nr_to_read) != nr_to_read)
{
- warning (_("Unable to access target "
+ warning (_("Unable to access %s bytes of target "
"memory at %s, halting search."),
+ plongest (nr_to_read),
hex_string (read_addr));
do_cleanups (old_cleanups);
return -1;
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 841341581c7..db61c62627e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,128 @@
+2012-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix entry values resolving in inlined frames.
+ * gdb.arch/amd64-entry-value-inline.S: New file.
+ * gdb.arch/amd64-entry-value-inline.c: New file.
+ * gdb.arch/amd64-entry-value-inline.exp: New file.
+
+2012-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Doug Evans <dje@google.com>
+
+ Fix recent gdb_breakpoint regression.
+ * gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly
+ braces from the parameter.
+ * gdb.java/jprint.exp: Likewise.
+
+2012-10-15 Doug Evans <dje@google.com>
+
+ * lib/gdb.exp (runto): Fix call to gdb_breakpoint.
+
+2012-10-15 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gdb.dwarf2/dw2-icc-opaque.S: Remove '#'.
+
+2012-10-15 Tom Tromey <tromey@redhat.com>
+
+ * gdb.python/py-symtab.exp: Test sal and symtab destructors.
+
+2012-10-15 Tom Tromey <tromey@redhat.com>
+
+ * gdb.python/py-symbol.exp: Test symbol destructor.
+
+2012-10-14 Yao Qi <yao@codesourcery.com>
+
+ * gdb.mi/mi2-cli.exp: Move to mi-cli.exp.
+ * gdb.mi/mi-cli.exp: New.
+
+ * gdb.mi/mi2-basics.exp: Remove.
+ * gdb.mi/mi2-break.exp: Remove.
+ * gdb.mi/mi2-console.exp: Remove.
+ * gdb.mi/mi2-disassemble.exp: Remove.
+ * gdb.mi/mi2-eval.exp: Remove.
+ * gdb.mi/mi2-file.exp: Remove.
+ * gdb.mi/mi2-hack-cli.exp: Remove.
+ * gdb.mi/mi2-pthreads.exp: Remove.
+ * gdb.mi/mi2-read-memory.exp: Remove.
+ * gdb.mi/mi2-regs.exp: Remove.
+ * gdb.mi/mi2-return.exp: Remove.
+ * gdb.mi/mi2-simplerun.exp: Remove.
+ * gdb.mi/mi2-stack.exp: Remove.
+ * gdb.mi/mi2-stepi.exp: Remove.
+ * gdb.mi/mi2-syn-frame.exp: Remove.
+ * gdb.mi/mi2-until.exp: Remove.
+ * gdb.mi/mi2-watch.exp: Remove.
+ * gdb.mi/mi2-var-block.exp: Remove.
+ * gdb.mi/mi2-var-cmd.exp: Remove.
+ * gdb.mi/mi2-var-display.exp: Remove.
+
+2012-10-12 Yao Qi <yao@codesourcery.com>
+
+ * gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove
+ trail '.*' on matching patterns.
+
+2012-10-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gdb.arch/i386-bp_permanent.exp: Skip if not is_x86_like_target.
+ * gdb.arch/i386-cfi-notcurrent.exp: Likewise.
+ * gdb.arch/i386-disp-step.exp: Likewise.
+ * gdb.arch/i386-gnu-cfi.exp: Likewise.
+ * gdb.arch/i386-prologue.exp: Likewise.
+ * gdb.arch/i386-size-overlap.exp: Likewise.
+ * gdb.arch/i386-size.exp: Likewise.
+ * gdb.arch/i386-unwind.exp: Likewise.
+
+2012-10-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gdb.arch/i386-byte.exp: Remove is_ilp32_target check.
+ * gdb.arch/i386-word.exp: Likewise.
+
+2012-10-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gdb.arch/i386-avx.exp: Check is_amd64_regs_target instead of
+ is_ilp32_target to set nr_regs.
+ * gdb.arch/i386-sse.exp: Likewise.
+
+2012-10-11 Doug Evans <dje@google.com>
+
+ PR breakpoints/14643.
+ * gdb.linespec/ls-errs.exp: Change tests of "b if|task|thread".
+ * gdb.linespec/thread.c: New file.
+ * gdb.linespec/thread.exp: New file.
+
+ * lib/gdb.exp (gdb_breakpoint): Fix varargs scan.
+ Recognize "message" -> print pass and fail. Add eof case.
+ (runto): Recognize message, no-message. Print pass/fail if requested,
+ with same treatment as gdb_breakpoint.
+ (runto_main): Pass no-message to runto.
+ (gdb_internal_error_resync): Add log message.
+ (gdb_file_cmd): Tweak internal error fail text for consistency.
+
+2012-10-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix crash during stepping on ppc32.
+ * gdb.base/step-symless.c: New file.
+ * gdb.base/step-symless.exp: New file.
+
+2012-10-03 Doug Evans <dje@google.com>
+
+ PR symtab/14601
+ * gdb.cp/using-crash.exp: New file.
+ * gdb.cp/using-crash.cc: New file.
+
+2012-10-02 Doug Evans <dje@google.com>
+
+ * lib/gdb.exp (gdb_unload): Change wording of perror text to be
+ more consistent.
+ (runto,gdb_debug_format): Ditto.
+ (gdb_file_cmd): Watch for eof in nested gdb_expect.
+ Clean up logging and error messages.
+
+2012-10-01 Andrew Burgess <aburgess@broadcom.com>
+
+ Test find command on unmapped memory.
+ * gdb.base/find-unmapped.c: New file.
+ * gdb.base/find-unmapped.exp: New file.
+
2012-09-29 Yao Qi <yao@codesourcery.com>
* gdb.trace/mi-tracepoint-changed.exp: New.
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S
new file mode 100644
index 00000000000..5f353f58c22
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S
@@ -0,0 +1,672 @@
+/* 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/>. */
+
+/* This file is compiled from gdb.arch/amd64-entry-value-inline.c
+ using -g -dA -S -O2. */
+
+ .file "amd64-entry-value-inline.c"
+ .text
+.Ltext0:
+ .p2align 4,,15
+ .type fn1, @function
+fn1:
+.LFB0:
+ .file 1 "gdb.arch/amd64-entry-value-inline.c"
+ # gdb.arch/amd64-entry-value-inline.c:22
+ .loc 1 22 0
+ .cfi_startproc
+.LVL0:
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%] (FALLTHRU)
+ # gdb.arch/amd64-entry-value-inline.c:23
+ .loc 1 23 0
+ movl v(%rip), %eax
+ addl $1, %eax
+ movl %eax, v(%rip)
+# SUCC: EXIT [100.0%]
+ ret
+ .cfi_endproc
+.LFE0:
+ .size fn1, .-fn1
+ .p2align 4,,15
+ .globl fn3
+ .type fn3, @function
+fn3:
+.LFB2:
+ # gdb.arch/amd64-entry-value-inline.c:41
+ .loc 1 41 0
+ .cfi_startproc
+.LVL1:
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%] (FALLTHRU)
+.LBB4:
+.LBB5:
+ # gdb.arch/amd64-entry-value-inline.c:29
+ .loc 1 29 0
+ testl %esi, %esi
+.LBE5:
+.LBE4:
+ # gdb.arch/amd64-entry-value-inline.c:41
+ .loc 1 41 0
+ pushq %rbx
+ .cfi_def_cfa_offset 16
+ .cfi_offset 3, -16
+ # gdb.arch/amd64-entry-value-inline.c:41
+ .loc 1 41 0
+ movl %edi, %ebx
+.LBB7:
+.LBB6:
+# SUCC: 3 [39.0%] (FALLTHRU,CAN_FALLTHRU) 4 [61.0%] (CAN_FALLTHRU)
+ # gdb.arch/amd64-entry-value-inline.c:29
+ .loc 1 29 0
+ je .L3
+# BLOCK 3 freq:3898 seq:1
+# PRED: 2 [39.0%] (FALLTHRU,CAN_FALLTHRU)
+ # gdb.arch/amd64-entry-value-inline.c:31
+ .loc 1 31 0
+ call fn1
+.LVL2:
+ # gdb.arch/amd64-entry-value-inline.c:32
+ .loc 1 32 0
+ leal -2(%rbx), %eax
+.LVL3:
+ # gdb.arch/amd64-entry-value-inline.c:33
+ .loc 1 33 0
+ movl %eax, %edi
+ imull %eax, %edi
+ addl $1, %edi
+.LVL4:
+ imull %edi, %eax
+.LVL5:
+ # gdb.arch/amd64-entry-value-inline.c:34
+ .loc 1 34 0
+ leal (%rbx,%rax), %edi
+ call fn1
+.LVL6:
+# SUCC: 4 [100.0%] (FALLTHRU,CAN_FALLTHRU)
+# BLOCK 4 freq:10000 seq:2
+# PRED: 2 [61.0%] (CAN_FALLTHRU) 3 [100.0%] (FALLTHRU,CAN_FALLTHRU)
+.L3:
+.LBE6:
+.LBE7:
+ # gdb.arch/amd64-entry-value-inline.c:43
+ .loc 1 43 0
+ movl %ebx, %eax
+ popq %rbx
+ .cfi_def_cfa_offset 8
+.LVL7:
+# SUCC: EXIT [100.0%]
+ ret
+ .cfi_endproc
+.LFE2:
+ .size fn3, .-fn3
+ .section .text.startup,"ax",@progbits
+ .p2align 4,,15
+ .globl main
+ .type main, @function
+main:
+.LFB3:
+ # gdb.arch/amd64-entry-value-inline.c:47
+ .loc 1 47 0
+ .cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%] (FALLTHRU)
+ # gdb.arch/amd64-entry-value-inline.c:48
+ .loc 1 48 0
+ movl $25, %esi
+ movl $6, %edi
+ call fn3
+.LVL8:
+ # gdb.arch/amd64-entry-value-inline.c:50
+ .loc 1 50 0
+ xorl %eax, %eax
+# SUCC: EXIT [100.0%]
+ ret
+ .cfi_endproc
+.LFE3:
+ .size main, .-main
+ .local v
+ .comm v,4,4
+ .text
+.Letext0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .long 0x164 # Length of Compilation Unit Info
+ .value 0x4 # DWARF version number
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
+ .long .LASF0 # DW_AT_producer: "GNU C 4.8.0 20121005 (experimental) -mtune=generic -march=x86-64 -g -O2"
+ .byte 0x1 # DW_AT_language
+ .long .LASF1 # DW_AT_name: "gdb.arch/amd64-entry-value-inline.c"
+ .long .LASF2 # DW_AT_comp_dir: ""
+ .long .Ldebug_ranges0+0x30 # DW_AT_ranges
+ .quad 0 # DW_AT_low_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram)
+ .ascii "fn1\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.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 0x52 # DW_AT_sibling
+ .uleb128 0x3 # (DIE (0x46) DW_TAG_formal_parameter)
+ .ascii "x\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x15 # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .byte 0 # end of children of DIE 0x29
+ .uleb128 0x4 # (DIE (0x52) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_subprogram)
+ .ascii "fn2\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x1b # DW_AT_decl_line
+ # DW_AT_prototyped
+ .long 0x52 # DW_AT_type
+ .byte 0x1 # DW_AT_inline
+ .long 0x7c # DW_AT_sibling
+ .uleb128 0x6 # (DIE (0x69) DW_TAG_formal_parameter)
+ .ascii "x\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x1b # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .uleb128 0x6 # (DIE (0x72) DW_TAG_formal_parameter)
+ .ascii "y\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x1b # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .byte 0 # end of children of DIE 0x59
+ .uleb128 0x7 # (DIE (0x7c) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "fn3\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x28 # DW_AT_decl_line
+ # DW_AT_prototyped
+ .long 0x52 # DW_AT_type
+ .quad .LFB2 # DW_AT_low_pc
+ .quad .LFE2-.LFB2 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ # DW_AT_GNU_all_call_sites
+ .long 0x115 # DW_AT_sibling
+ .uleb128 0x8 # (DIE (0x9d) DW_TAG_formal_parameter)
+ .ascii "x\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x28 # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .long .LLST0 # DW_AT_location
+ .uleb128 0x8 # (DIE (0xaa) DW_TAG_formal_parameter)
+ .ascii "y\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x28 # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .long .LLST1 # DW_AT_location
+ .uleb128 0x9 # (DIE (0xb7) DW_TAG_inlined_subroutine)
+ .long 0x59 # DW_AT_abstract_origin
+ .quad .LBB4 # DW_AT_entry_pc
+ .long .Ldebug_ranges0+0 # DW_AT_ranges
+ .byte 0x1 # DW_AT_call_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x2a # DW_AT_call_line
+ .uleb128 0xa # (DIE (0xca) DW_TAG_formal_parameter)
+ .long 0x72 # DW_AT_abstract_origin
+ .long .LLST2 # DW_AT_location
+ .uleb128 0xa # (DIE (0xd3) DW_TAG_formal_parameter)
+ .long 0x69 # DW_AT_abstract_origin
+ .long .LLST0 # DW_AT_location
+ .uleb128 0xb # (DIE (0xdc) DW_TAG_GNU_call_site)
+ .quad .LVL2 # DW_AT_low_pc
+ .long 0x29 # DW_AT_abstract_origin
+ .long 0xf4 # DW_AT_sibling
+ .uleb128 0xc # (DIE (0xed) DW_TAG_GNU_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0x2 # DW_AT_GNU_call_site_value
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 0
+ .byte 0 # end of children of DIE 0xdc
+ .uleb128 0xd # (DIE (0xf4) DW_TAG_GNU_call_site)
+ .quad .LVL6 # DW_AT_low_pc
+ .long 0x29 # DW_AT_abstract_origin
+ .uleb128 0xc # (DIE (0x101) DW_TAG_GNU_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0xd # DW_AT_GNU_call_site_value
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x1e # DW_OP_mul
+ .byte 0x23 # DW_OP_plus_uconst
+ .uleb128 0x1
+ .byte 0x1e # DW_OP_mul
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 0
+ .byte 0x22 # DW_OP_plus
+ .byte 0 # end of children of DIE 0xf4
+ .byte 0 # end of children of DIE 0xb7
+ .byte 0 # end of children of DIE 0x7c
+ .uleb128 0xe # (DIE (0x115) DW_TAG_subprogram)
+ # DW_AT_external
+ .long .LASF3 # DW_AT_name: "main"
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x2e # DW_AT_decl_line
+ .long 0x52 # DW_AT_type
+ .quad .LFB3 # DW_AT_low_pc
+ .quad .LFE3-.LFB3 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ # DW_AT_GNU_all_call_sites
+ .long 0x14f # DW_AT_sibling
+ .uleb128 0xd # (DIE (0x136) DW_TAG_GNU_call_site)
+ .quad .LVL8 # DW_AT_low_pc
+ .long 0x7c # DW_AT_abstract_origin
+ .uleb128 0xc # (DIE (0x143) DW_TAG_GNU_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0x1 # DW_AT_GNU_call_site_value
+ .byte 0x36 # DW_OP_lit6
+ .uleb128 0xc # (DIE (0x148) DW_TAG_GNU_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x54 # DW_OP_reg4
+ .uleb128 0x1 # DW_AT_GNU_call_site_value
+ .byte 0x49 # DW_OP_lit25
+ .byte 0 # end of children of DIE 0x136
+ .byte 0 # end of children of DIE 0x115
+ .uleb128 0xf # (DIE (0x14f) DW_TAG_variable)
+ .ascii "v\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
+ .byte 0x12 # DW_AT_decl_line
+ .long 0x162 # DW_AT_type
+ .uleb128 0x9 # DW_AT_location
+ .byte 0x3 # DW_OP_addr
+ .quad v
+ .uleb128 0x10 # (DIE (0x162) DW_TAG_volatile_type)
+ .long 0x52 # DW_AT_type
+ .byte 0 # end of children of DIE 0xb
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x55 # (DW_AT_ranges)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 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 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .uleb128 0x4 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0
+ .byte 0
+ .uleb128 0x5 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x20 # (DW_AT_inline)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x6 # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x7 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x8 # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x9 # (abbrev code)
+ .uleb128 0x1d # (TAG: DW_TAG_inlined_subroutine)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x52 # (DW_AT_entry_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x55 # (DW_AT_ranges)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x58 # (DW_AT_call_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x59 # (DW_AT_call_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .byte 0
+ .byte 0
+ .uleb128 0xa # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0xb # (abbrev code)
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0xc # (abbrev code)
+ .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x2111 # (DW_AT_GNU_call_site_value)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .uleb128 0xd # (abbrev code)
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0xe # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0xf # (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 0x10 # (abbrev code)
+ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
+ .byte 0 # DW_children_no
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .quad .LVL1 # Location list begin address (*.LLST0)
+ .quad .LVL2-1 # Location list end address (*.LLST0)
+ .value 0x1 # Location expression size
+ .byte 0x55 # DW_OP_reg5
+ .quad .LVL2-1 # Location list begin address (*.LLST0)
+ .quad .LVL7 # Location list end address (*.LLST0)
+ .value 0x1 # Location expression size
+ .byte 0x53 # DW_OP_reg3
+ .quad .LVL7 # Location list begin address (*.LLST0)
+ .quad .LFE2 # Location list end address (*.LLST0)
+ .value 0x1 # Location expression size
+ .byte 0x50 # DW_OP_reg0
+ .quad 0 # Location list terminator begin (*.LLST0)
+ .quad 0 # Location list terminator end (*.LLST0)
+.LLST1:
+ .quad .LVL1 # Location list begin address (*.LLST1)
+ .quad .LVL2-1 # Location list end address (*.LLST1)
+ .value 0x1 # Location expression size
+ .byte 0x54 # DW_OP_reg4
+ .quad .LVL2-1 # Location list begin address (*.LLST1)
+ .quad .LFE2 # Location list end address (*.LLST1)
+ .value 0x4 # Location expression size
+ .byte 0xf3 # DW_OP_GNU_entry_value
+ .uleb128 0x1
+ .byte 0x54 # DW_OP_reg4
+ .byte 0x9f # DW_OP_stack_value
+ .quad 0 # Location list terminator begin (*.LLST1)
+ .quad 0 # Location list terminator end (*.LLST1)
+.LLST2:
+ .quad .LVL1 # Location list begin address (*.LLST2)
+ .quad .LVL2-1 # Location list end address (*.LLST2)
+ .value 0x1 # Location expression size
+ .byte 0x54 # DW_OP_reg4
+ .quad .LVL2-1 # Location list begin address (*.LLST2)
+ .quad .LVL3 # Location list end address (*.LLST2)
+ .value 0x4 # Location expression size
+ .byte 0xf3 # DW_OP_GNU_entry_value
+ .uleb128 0x1
+ .byte 0x54 # DW_OP_reg4
+ .byte 0x9f # DW_OP_stack_value
+ .quad .LVL3 # Location list begin address (*.LLST2)
+ .quad .LVL4 # Location list end address (*.LLST2)
+ .value 0x1 # Location expression size
+ .byte 0x50 # DW_OP_reg0
+ .quad .LVL4 # Location list begin address (*.LLST2)
+ .quad .LVL5 # Location list end address (*.LLST2)
+ .value 0x6 # Location expression size
+ .byte 0x70 # DW_OP_breg0
+ .sleb128 0
+ .byte 0x75 # DW_OP_breg5
+ .sleb128 0
+ .byte 0x1e # DW_OP_mul
+ .byte 0x9f # DW_OP_stack_value
+ .quad .LVL5 # Location list begin address (*.LLST2)
+ .quad .LVL6-1 # Location list end address (*.LLST2)
+ .value 0x1 # Location expression size
+ .byte 0x50 # DW_OP_reg0
+ .quad .LVL6-1 # Location list begin address (*.LLST2)
+ .quad .LVL6 # Location list end address (*.LLST2)
+ .value 0xb # Location expression size
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x73 # DW_OP_breg3
+ .sleb128 -2
+ .byte 0x1e # DW_OP_mul
+ .byte 0x23 # DW_OP_plus_uconst
+ .uleb128 0x1
+ .byte 0x1e # DW_OP_mul
+ .byte 0x9f # DW_OP_stack_value
+ .quad 0 # Location list terminator begin (*.LLST2)
+ .quad 0 # Location list terminator end (*.LLST2)
+ .section .debug_aranges,"",@progbits
+ .long 0x3c # Length of Address Ranges Info
+ .value 0x2 # DWARF Version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0 # Size of Segment Descriptor
+ .value 0 # Pad to 16 byte boundary
+ .value 0
+ .quad .Ltext0 # Address
+ .quad .Letext0-.Ltext0 # Length
+ .quad .LFB3 # Address
+ .quad .LFE3-.LFB3 # Length
+ .quad 0
+ .quad 0
+ .section .debug_ranges,"",@progbits
+.Ldebug_ranges0:
+ .quad .LBB4 # Offset 0
+ .quad .LBE4
+ .quad .LBB7
+ .quad .LBE7
+ .quad 0
+ .quad 0
+ .quad .Ltext0 # Offset 0x30
+ .quad .Letext0
+ .quad .LFB3 # Offset 0x40
+ .quad .LFE3
+ .quad 0
+ .quad 0
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_str,"MS",@progbits,1
+.LASF0:
+ .string "GNU C 4.8.0 20121005+patches (experimental) -mtune=generic -march=x86-64 -g -O2"
+.LASF1:
+ .string "gdb.arch/amd64-entry-value-inline.c"
+.LASF2:
+ .string ""
+.LASF3:
+ .string "main"
+ .ident "GCC: (GNU) 4.8.0 20121005 (experimental)"
+ .section .note.GNU-stack,"",@progbits
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c
new file mode 100644
index 00000000000..f7fefb82b64
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c
@@ -0,0 +1,50 @@
+/* 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/>. */
+
+static volatile int v;
+
+static __attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ v++;
+}
+
+static int
+fn2 (int x, int y)
+{
+ if (y)
+ {
+ fn1 (x);
+ y = -2 + x; /* break-here */
+ y = y * y * y + y;
+ fn1 (x + y);
+ }
+ return x;
+}
+
+__attribute__((noinline, noclone)) int
+fn3 (int x, int y)
+{
+ return fn2 (x, y);
+}
+
+int
+main ()
+{
+ fn3 (6, 25);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
new file mode 100644
index 00000000000..6aa92c12bfd
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
@@ -0,0 +1,40 @@
+# Copyright (C) 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/>.
+
+set opts {}
+standard_testfile .S
+
+if [info exists COMPILE] {
+ # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-inline.exp COMPILE=1"
+ standard_testfile
+ lappend opts debug optimize=-O2
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+ verbose "Skipping ${testfile}."
+ return
+}
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+ return -1
+}
+
+if ![runto_main] {
+ return -1
+}
+
+set srcfile $testfile.c
+gdb_breakpoint [gdb_get_line_number "break-here"]
+
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+gdb_test "p y" " = 25"
diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp
index 52a6e4aa8f5..32ba5b658de 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx.exp
@@ -73,10 +73,10 @@ gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
"set first breakpoint in main"
gdb_continue_to_breakpoint "continue to first breakpoint in main"
-if [is_ilp32_target] {
- set nr_regs 8
-} else {
+if [is_amd64_regs_target] {
set nr_regs 16
+} else {
+ set nr_regs 8
}
for { set r 0 } { $r < $nr_regs } { incr r } {
diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
index 026f956df9f..907eb95e24e 100644
--- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
+++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
@@ -18,7 +18,7 @@
# Test stepping over permanent breakpoints on i386.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping skip over permanent breakpoint on i386 tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-byte.exp b/gdb/testsuite/gdb.arch/i386-byte.exp
index 38e8c4d884e..d34941ef662 100644
--- a/gdb/testsuite/gdb.arch/i386-byte.exp
+++ b/gdb/testsuite/gdb.arch/i386-byte.exp
@@ -19,7 +19,7 @@
# This file is part of the gdb testsuite.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then {
verbose "Skipping i386 byte register tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
index cf41c572789..52731f720f1 100644
--- a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
+++ b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
@@ -16,7 +16,7 @@
# [RFA] DWARF frame unwinder executes one too many rows
# http://sourceware.org/ml/gdb-patches/2012-07/msg00650.html
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } {
+if { ![is_x86_like_target] } {
return 0
}
diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp
index 8a51be5f219..bf7f985dfe3 100644
--- a/gdb/testsuite/gdb.arch/i386-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp
@@ -18,7 +18,7 @@
# Test i386 displaced stepping.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping x86 displaced stepping tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
index d7b41cc3155..f603fc51f6d 100644
--- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
+++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
@@ -23,7 +23,7 @@
# Test i386 unwinder.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping i386 unwinder tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index 2e724aa77e0..b48952f1c85 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -21,7 +21,7 @@
# Test i386 prologue analyzer.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping i386 prologue tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
index 23cbabc862e..67d5db1af43 100644
--- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp
+++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
@@ -17,7 +17,7 @@
# Test that GDB can handle overlapping sizes of symbols.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping i386 unwinder tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp
index 241d939fade..0f0b1d8dcb8 100644
--- a/gdb/testsuite/gdb.arch/i386-size.exp
+++ b/gdb/testsuite/gdb.arch/i386-size.exp
@@ -20,7 +20,7 @@
# Test that GDB can see the sizes of symbols.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping i386 unwinder tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp
index 896faf35427..4132e0c0bad 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse.exp
@@ -73,10 +73,10 @@ gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
"set first breakpoint in main"
gdb_continue_to_breakpoint "continue to first breakpoint in main"
-if [is_ilp32_target] {
- set nr_regs 8
-} else {
+if [is_amd64_regs_target] {
set nr_regs 16
+} else {
+ set nr_regs 8
}
for { set r 0 } { $r < $nr_regs } { incr r } {
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
index 4ae59434853..89fcbc99f7b 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -21,7 +21,7 @@
# Test i386 unwinder.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if { ![is_x86_like_target] } then {
verbose "Skipping i386 unwinder tests."
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-word.exp b/gdb/testsuite/gdb.arch/i386-word.exp
index fb402fbb769..b0439a0613f 100644
--- a/gdb/testsuite/gdb.arch/i386-word.exp
+++ b/gdb/testsuite/gdb.arch/i386-word.exp
@@ -19,7 +19,7 @@
# This file is part of the gdb testsuite.
-if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then {
+if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then {
verbose "Skipping i386 word register tests."
return
}
diff --git a/gdb/testsuite/gdb.base/find-unmapped.c b/gdb/testsuite/gdb.base/find-unmapped.c
new file mode 100644
index 00000000000..e63dc99a94d
--- /dev/null
+++ b/gdb/testsuite/gdb.base/find-unmapped.c
@@ -0,0 +1,106 @@
+/* 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/>. */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include <string.h>
+
+#define CHUNK_SIZE 16000 /* same as findcmd.c's */
+
+void *global_var_0;
+void *global_var_1;
+void *global_var_2;
+
+void
+breakpt ()
+{
+ /* Nothing. */
+}
+
+int
+main (void)
+{
+ void *p;
+ size_t pg_size;
+ int pg_count;
+ void *unmapped_page, *last_mapped_page, *first_mapped_page;
+
+ /*
+ Map enough pages to cover at least CHUNK_SIZE, and one extra page. We
+ then unmap the last page.
+
+ From gdb we can then perform find commands into unmapped region, gdb
+ should give an error.
+
+ .-- global_var_0 .-- global_var_1
+ | | .-- global_var_2
+ | | |
+ .----.----.----.----.----.
+ | | | | | |
+ '----'----'----'----'----'
+ |<- CHUNK_SIZE ->|
+
+ If CHUNK_SIZE equals page size then we'll get 3 pages, and if
+ CHUNK_SIZE is less than page size we'll get 2 pages. The test will
+ still work in these cases.
+
+ (1) We do a find from global_var_0 to global_var_2, this will fail when
+ loading the second chunk, as we know at least CHUNK_SIZE bytes are in
+ mapped space.
+
+ (2) We do a find from global_var_1 to global_var_2, this will fail when
+ loading the first chunk, assuming the CHUNK_SIZE is at least 16 bytes.
+
+ (3) We do a find from global_var_2 to (global_var_2 + 16), this too
+ will fail when loading the first chunk regardless of the chunk size.
+ */
+
+ pg_size = getpagesize ();
+ /* The +2 ensures the extra page. */
+ pg_count = CHUNK_SIZE / pg_size + 2;
+
+ p = mmap (0, pg_count * pg_size, PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+ if (p == MAP_FAILED)
+ {
+ perror ("mmap");
+ return EXIT_FAILURE;
+ }
+
+ memset (p, 0, pg_count * pg_size);
+
+ if (munmap (p + (pg_count - 1) * pg_size, pg_size) == -1)
+ {
+ perror ("munmap");
+ return EXIT_FAILURE;
+ }
+
+ first_mapped_page = p;
+ last_mapped_page = p + (pg_count - 2) * pg_size;
+ unmapped_page = last_mapped_page + pg_size;
+
+ /* Setup global variables we reference from gdb. */
+ global_var_0 = first_mapped_page;
+ global_var_1 = unmapped_page - 16;
+ global_var_2 = unmapped_page + 16;
+
+ breakpt ();
+
+ return EXIT_SUCCESS;
+}
diff --git a/gdb/testsuite/gdb.base/find-unmapped.exp b/gdb/testsuite/gdb.base/find-unmapped.exp
new file mode 100644
index 00000000000..66907e2e064
--- /dev/null
+++ b/gdb/testsuite/gdb.base/find-unmapped.exp
@@ -0,0 +1,46 @@
+# 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/>.
+
+if {[is_remote target]} {
+ # gdbserver prints the warning message but expect is parsing only the
+ # GDB output, not the gdbserver output.
+ return 0
+}
+
+standard_testfile
+
+if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+ return -1
+}
+
+if ![runto breakpt] {
+ return -1
+}
+
+# Basic attempt to read memory from globals.
+gdb_test "x/5w global_var_1" \
+ "$hex:\[ \t\]+0\[ \t\]+0\[ \t\]+0\[ \t\]+0\r\n$hex:\[ \t\]+Cannot access memory at address $hex"
+gdb_test "x/5w global_var_2" \
+ "$hex:\[ \t\]+Cannot access memory at address $hex"
+
+# Now try a find starting from each global.
+gdb_test "find global_var_0, global_var_2, 0xff" \
+ "warning: Unable to access $decimal bytes of target memory at $hex, halting search\.\r\nPattern not found."
+
+gdb_test "find global_var_1, global_var_2, 0xff" \
+ "warning: Unable to access $decimal bytes of target memory at $hex, halting search\.\r\nPattern not found."
+
+gdb_test "find global_var_2, (global_var_2 + 16), 0xff" \
+ "warning: Unable to access $decimal bytes of target memory at $hex, halting search\.\r\nPattern not found."
diff --git a/gdb/testsuite/gdb.base/step-symless.c b/gdb/testsuite/gdb.base/step-symless.c
new file mode 100644
index 00000000000..97eaf5edc11
--- /dev/null
+++ b/gdb/testsuite/gdb.base/step-symless.c
@@ -0,0 +1,38 @@
+/* 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/>. */
+
+static volatile int v;
+
+static void
+symful (void)
+{
+ v++;
+}
+
+static void
+symless (void)
+{
+ v++;
+}
+
+int
+main (void)
+{
+ symless ();
+ symful ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/step-symless.exp b/gdb/testsuite/gdb.base/step-symless.exp
new file mode 100644
index 00000000000..47d36abd7c4
--- /dev/null
+++ b/gdb/testsuite/gdb.base/step-symless.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 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/>.
+
+standard_testfile
+if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {nodebug}] == -1} {
+ return -1
+}
+
+# We need those symbols global to access them from the .S file.
+set test "strip stub symbols"
+set objcopy_program [transform objcopy]
+set result [catch "exec $objcopy_program -N symless ${binfile}" output]
+verbose "result is $result"
+verbose "output is $output"
+if {$result != 0} {
+ fail $test
+ return
+}
+pass $test
+
+clean_restart $testfile
+
+if ![runto_main] {
+ return -1
+}
+
+gdb_breakpoint symful
+
+gdb_test "step" "Single stepping until exit.*no line number information.*\r\nBreakpoint \[^\r\n\]* in \\.?symful \\(\\)"
diff --git a/gdb/testsuite/gdb.cp/using-crash.cc b/gdb/testsuite/gdb.cp/using-crash.cc
new file mode 100644
index 00000000000..a3a5e43ef21
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/using-crash.cc
@@ -0,0 +1,43 @@
+/* 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/>.
+*/
+
+#include <iostream>
+using namespace std;
+
+class c1;
+
+void foo ();
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
+
+void
+foo ()
+{
+ c1 *p = 0;
+}
+
+class b1 { public: int x; };
+
+class c1 : public b1
+{
+ public:
+ using b1::x;
+ c1 () {}
+};
diff --git a/gdb/testsuite/gdb.mi/mi2-hack-cli.exp b/gdb/testsuite/gdb.cp/using-crash.exp
index fb1e4d7d002..0aa2198258d 100644
--- a/gdb/testsuite/gdb.mi/mi2-hack-cli.exp
+++ b/gdb/testsuite/gdb.cp/using-crash.exp
@@ -1,5 +1,4 @@
-# Copyright 1999, 2001, 2003, 2007-2012 Free Software Foundation, Inc.
-
+# 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
@@ -13,24 +12,21 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+standard_testfile .cc
-# Some basic checks for the CLI.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+ return -1
}
-mi_gdb_test "show architecture" \
- "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
- "show architecture"
-
-mi_gdb_test "47show architecture" \
- "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
- "47show architecture"
-
-mi_gdb_exit
-return 0
+runto "foo"
+
+# This would cause reading debug info with using_directives pointing to
+# freed memory.
+# http://sourceware.org/bugzilla/show_bug.cgi?id=14601
+# Note: You may need to compile with -fdebug-types-section to see the crash.
+set test "reload file"
+if { [gdb_file_cmd "$binfile"] == 0 } {
+ pass $test
+} else {
+ fail $test
+}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
index 47b017b3e43..ddeb6c855ef 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
@@ -35,7 +35,7 @@
.file "opaque-pointer.c"
.data
.comm p_struct,8,8
- .global p_struct#
+ .global p_struct
.section .debug_info
debug_info_seg1:
diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp
index 72158613ead..4bd1800a589 100644
--- a/gdb/testsuite/gdb.java/jmisc.exp
+++ b/gdb/testsuite/gdb.java/jmisc.exp
@@ -43,8 +43,8 @@ if [set_lang_java] then {
# signature.
runto_main
set function "${testfile}.main(java.lang.String\[\])"
- gdb_breakpoint "$function" { allow-pending }
- gdb_breakpoint "${function}void" { allow-pending }
+ gdb_breakpoint "$function" allow-pending
+ gdb_breakpoint "${function}void" allow-pending
gdb_continue_to_breakpoint $function
gdb_test_multiple "ptype jmisc" "ptype jmisc" {
diff --git a/gdb/testsuite/gdb.java/jprint.exp b/gdb/testsuite/gdb.java/jprint.exp
index b2d5d310cc3..116a4bafd59 100644
--- a/gdb/testsuite/gdb.java/jprint.exp
+++ b/gdb/testsuite/gdb.java/jprint.exp
@@ -43,8 +43,8 @@ if [set_lang_java] then {
# signature.
runto_main
set function "${testfile}.main(java.lang.String\[\])"
- gdb_breakpoint "$function" { allow-pending }
- gdb_breakpoint "${function}void" { allow-pending }
+ gdb_breakpoint "$function" allow-pending
+ gdb_breakpoint "${function}void" allow-pending
gdb_continue_to_breakpoint $function
gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call"
diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp
index 5668397a3b0..7ee2623a9fb 100644
--- a/gdb/testsuite/gdb.linespec/ls-errs.exp
+++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
@@ -171,7 +171,7 @@ foreach x {"3" "+100" "-100" "foo"} {
}
foreach x {"if" "task" "thread"} {
- add the_tests $x unexpected_opt "keyword" $x
+ add the_tests $x invalid_function $x
}
add the_tests "'main.c'flubber" unexpected_opt "string" "flubber"
diff --git a/gdb/testsuite/gdb.linespec/thread.c b/gdb/testsuite/gdb.linespec/thread.c
new file mode 100644
index 00000000000..185e4a378ea
--- /dev/null
+++ b/gdb/testsuite/gdb.linespec/thread.c
@@ -0,0 +1,31 @@
+/* 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/>. */
+
+/* http://sourceware.org/bugzilla/show_bug.cgi?id=14643 */
+
+static void
+thread ()
+{
+}
+
+int
+main ()
+{
+ int x = 0;
+ thread (); /* set breakpoint 1 here */
+ return x;
+}
diff --git a/gdb/testsuite/gdb.linespec/thread.exp b/gdb/testsuite/gdb.linespec/thread.exp
new file mode 100644
index 00000000000..1e8ee465a35
--- /dev/null
+++ b/gdb/testsuite/gdb.linespec/thread.exp
@@ -0,0 +1,41 @@
+# 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/>.
+
+# http://sourceware.org/bugzilla/show_bug.cgi?id=14643
+# gdb 7.5 thinks "thread" is a linespec keyword.
+
+standard_testfile
+set exefile $testfile
+
+if {[prepare_for_testing $testfile $exefile $srcfile {debug}]} {
+ return -1
+}
+
+if ![runto_main] {
+ fail "Can't run to main"
+ return 0
+}
+
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+
+gdb_test "break $srcfile:$bp_location1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
+ "breakpoint line number in file"
+
+gdb_continue_to_breakpoint "$bp_location1"
+
+gdb_breakpoint "thread" "message"
+
+gdb_continue_to_breakpoint "thread function"
diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index c3abd743c4d..773f588d5cd 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -163,11 +163,11 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
set test "breakpoint on pendfunc1 resolved"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\"" {
pass $test
exp_continue
}
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\"" {
pass "$test: hit_count is updated"
}
-re ".*${mi_gdb_prompt}$" {
@@ -219,7 +219,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
mi_send_resuming_command "exec-continue" "continuing to exit"
set test "breakpoint on pendfunc3 pending again"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\"" {
pass $test
}
-re ".*${mi_gdb_prompt}$" {
diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index 03ede233d96..bab2373f62c 100644
--- a/gdb/testsuite/gdb.mi/mi2-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -20,7 +20,7 @@
# handlers, etc.
load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
+set MIFLAGS "-i=mi"
gdb_exit
if [mi_gdb_start] {
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-cli.exp
+ untested mi-cli.exp
return -1
}
@@ -56,7 +56,7 @@ mi_gdb_test "-interpreter-exec console bogus" \
# {(=.*)+\^done} \
# "-interpreter-exec console \"file \$binfile\""
mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
- {~"Reading symbols from .*mi2-cli...".*\^done} \
+ {~"Reading symbols from .*mi-cli...".*\^done} \
"-interpreter-exec console \"file \$binfile\""
mi_run_to_main
diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp
deleted file mode 100644
index 3a54f99ea98..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-basics.exp
+++ /dev/null
@@ -1,229 +0,0 @@
-# Copyright 1999-2005, 2007-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/>.
-
-#
-# test basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-set escapedobjdir [string_to_regexp ${objdir}]
-set envirodir [string_to_regexp ${objdir}/${subdir}]
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-basics.exp
- return -1
-}
-
-# In this file we want to test if the operations needed by the following
-# procedures work, so it makes no sense using them here.
-
-# mi_delete_breakpoints
-# mi_gdb_reinitialize_dir $srcdir/$subdir
-# mi_gdb_load ${binfile}
-
-# Test if the MI interpreter has been configured
-
-proc test_mi_interpreter_selection {} {
- global mi_gdb_prompt
- global gdb_prompt
-
- # All this test expects is to get the prompt back
- # with no syntax error message
- if ![mi_gdb_test "-gdb-version" "~\"GNU gdb.*" "acceptance of MI operations"] {
- return 1
- }
-
- note "Skipping all other MI tests."
- return 0
-}
-
-proc test_exec_and_symbol_mi_operatons {} {
- global mi_gdb_prompt
- global binfile
-
- # Load symbols and specify executable on a single operation
- # Tests:
- # -file-exec-and-symbols
-
- if [mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\\^done" \
- "file-exec-and-symbols operation"] {
- note "Skipping all other MI tests."
- return 0
- }
-
- # The following is not used by mi-support.exp, but we test here so
- # we get done with loading a program basics.
-
- # Do it again, but now load symbols and specify executable with
- # two separate operations
- # Tests:
- # -file-clear
- # -file-exec-file
- # -file-symbol-file
-
- # FIXME: file-clear is not implemented yet.
-# mi_gdb_test "-file-clear" \
-# "\\\^done" \
-# "file-clear operation"
-
- mi_gdb_test "-file-exec-file ${binfile}" \
- "\\\^done" \
- "file-exec-file operation"
-
- mi_gdb_test "-file-symbol-file ${binfile}" \
- "\\\^done" \
- "file-symbol-file operation"
-
- # We need to return != 0.
- return 1
-}
-
-proc test_breakpoints_deletion {} {
- global mi_gdb_prompt
- global srcfile
-
- # Clear all breakpoints and list to confirm
- # Tests:
- # -break-delete (all)
- # -break-list
-
- # The all parameter is actually no parameter.
- mi_gdb_test "200-break-delete" \
- "200\\\^done" \
- "break-delete (all) operation"
-
- mi_gdb_test "201-break-list" \
- ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \
- "all breakpoints removed"
-}
-
-proc test_dir_specification {} {
- global mi_gdb_prompt
- global objdir
- global subdir
- global envirodir
-
- # Add to the search directories, display, then reset back to default
- # Tests:
- # -environment-directory arg
- # -environment-directory
- # -environment-directory -r
-
- mi_gdb_test "202-environment-directory ${objdir}/${subdir}" \
- "202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
- "environment-directory arg operation"
-
- mi_gdb_test "203-environment-directory" \
- "203\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
- "environment-directory empty-string operation"
-
- mi_gdb_test "204-environment-directory -r" \
- "204\\\^done,source-path=\"\\\$cdir.\\\$cwd\"" \
- "environment-directory operation"
-
-#exp_internal 0
-}
-
-proc test_cwd_specification {} {
- global mi_gdb_prompt
- global objdir
- global subdir
- global escapedobjdir
-
- # Change the working directory, then print the current working directory
- # Tests:
- # -environment-cd ${objdir}
- # -environment-pwd
-
- mi_gdb_test "205-environment-cd ${objdir}" \
- "205\\\^done" \
- "environment-cd arg operation"
-
- # The canonical name of the working directory may differ on a
- # remote host from that on the build system.
- if ![is_remote host] {
- mi_gdb_test "206-environment-pwd" \
- "206\\\^done,cwd=\"${escapedobjdir}\"" \
- "environment-pwd operation"
- }
-}
-
-proc test_path_specification {} {
- global mi_gdb_prompt
- global orig_path
- global objdir
- global subdir
- global escapedobjdir
- global envirodir
- global expect_out
-
- # Add to the path, display, then reset
- # Tests:
- # -environment-path
- # -environment-path dir1 dir2
- # -environment-path -r dir
- # -environment-path -r
-
- mi_gdb_test "-environment-path" "\\\^done,path=\"(.*)\"" "-environment-path"
- set orig_path $expect_out(3,string)
-
- set orig_path [string_to_regexp ${orig_path}]
- set pathdir [string_to_regexp ${objdir}/${subdir}]
-
- mi_gdb_test "207-environment-path" \
- "207\\\^done,path=\"$orig_path\"" \
- "environment-path no-args operation"
-
- mi_gdb_test "208-environment-path $objdir ${objdir}/${subdir}" \
- "208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \
- "environment-path dir1 dir2 operation"
-
- mi_gdb_test "209-environment-path -r $objdir" \
- "209\\\^done,path=\"$escapedobjdir.$orig_path\"" \
- "environment-path -r dir operation"
-
- mi_gdb_test "210-environment-path -r" \
- "210\\\^done,path=\"$orig_path\"" \
- "environment-path -r operation"
-
-}
-
-if { [test_mi_interpreter_selection]
- && [test_exec_and_symbol_mi_operatons] } {
- test_breakpoints_deletion
- test_dir_specification
- test_cwd_specification
- test_path_specification
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-break.exp b/gdb/testsuite/gdb.mi/mi2-break.exp
deleted file mode 100644
index e1375e2b082..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-break.exp
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999, 2001, 2003-2004, 2006-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-break.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-# Locate line numbers in basics.c.
-set line_callee4_head [gdb_get_line_number "callee4 ("]
-set line_callee4_body [expr $line_callee4_head + 2]
-set line_callee3_head [gdb_get_line_number "callee3 ("]
-set line_callee3_body [expr $line_callee3_head + 2]
-set line_callee2_head [gdb_get_line_number "callee2 ("]
-set line_callee2_body [expr $line_callee2_head + 2]
-set line_callee1_head [gdb_get_line_number "callee1 ("]
-set line_callee1_body [expr $line_callee1_head + 2]
-set line_main_head [gdb_get_line_number "main ("]
-set line_main_body [expr $line_main_head + 2]
-
-set fullname "fullname=\"${fullname_syntax}${srcfile}\""
-
-proc test_tbreak_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
- global line_callee4_head line_callee4_body
- global line_callee3_head line_callee3_body
- global line_callee2_head line_callee2_body
- global line_callee1_head line_callee1_body
- global line_main_head line_main_body
- global fullname
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert -t main
- # -break-insert -t basics.c:callee2
- # -break-insert -t basics.c:$line_callee3_head
- # -break-insert -t srcfile:$line_callee4_head
- # -break-list
-
- mi_create_breakpoint "-t main" 1 del main ".*basics.c" $line_main_body $hex \
- "break-insert -t operation"
-
- mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \
- "insert temp breakpoint at basics.c:callee2"
-
- mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_head $hex \
- "insert temp breakpoint at basics.c:\$line_callee3_head"
-
- # Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
- mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_head $hex \
- "insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
-
- mi_gdb_test "666-break-list" \
- "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\",original-location=\".*\"\}.*\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "777-break-delete" \
- "777\\^done" \
- "delete temp breakpoints"
-}
-
-proc test_rbreak_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
- global line_callee4_head line_callee4_body
- global line_callee3_head line_callee3_body
- global line_callee2_head line_callee2_body
- global line_callee1_head line_callee1_body
- global line_main_head line_main_body
- global fullname
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert -r main
- # -break-insert -r callee2
- # -break-insert -r callee
- # -break-insert -r .*llee
- # -break-list
-
- setup_xfail "*-*-*"
- mi_gdb_test "122-break-insert -r main" \
- "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_main_body\"\}" \
- "break-insert -r operation"
-
- setup_xfail "*-*-*"
- mi_gdb_test "133-break-insert -r callee2" \
- "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\"\}" \
- "insert breakpoint with regexp callee2"
-
- setup_xfail "*-*-*"
- mi_gdb_test "144-break-insert -r callee" \
- "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee1_body\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee3_body\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee4_body\"\}" \
- "insert breakpoint with regexp callee"
-
- setup_xfail "*-*-*"
- mi_gdb_test "155-break-insert -r \.\*llee" \
- "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee1_body\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee3_body\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",${fullname},line=\"$line_callee4_body\"\}" \
- "insert breakpoint with regexp .*llee"
-
- setup_xfail "*-*-*"
- mi_gdb_test "166-break-list" \
- "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "177-break-delete" \
- "177\\^done" \
- "delete temp breakpoints"
-}
-
-test_tbreak_creation_and_listing
-test_rbreak_creation_and_listing
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-console.exp b/gdb/testsuite/gdb.mi/mi2-console.exp
deleted file mode 100644
index e1e180bdfe9..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-console.exp
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2003, 2005, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-# This test only works when talking to a target that routes its output
-# through GDB. Check that we're either talking to a simulator or a
-# remote target.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile mi-console.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-console.exp
- return -1
-}
-
-mi_run_to_main
-
-# Next over the hello() call which will produce lots of output
-mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \
- "Started step over hello"
-
-if { ![target_info exists gdb,noinferiorio] } {
- gdb_expect {
- -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
- pass "Hello message"
- }
- -re "Hello" {
-
- # Probably a native system where GDB doesn't have direct #
- # control over the inferior console. # For this to work,
- # GDB would need to run the inferior process # under a PTY
- # and then use the even-loops ability to wait on #
- # multiple event sources to channel the output back
- # through the # MI.
-
- kfail "gdb/623" "Hello message"
- }
- timeout {
- fail "Hello message (timeout)"
- }
- }
-}
-
-mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" "14" "" \
- "finished step over hello"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-disassemble.exp b/gdb/testsuite/gdb.mi/mi2-disassemble.exp
deleted file mode 100644
index 30e9129047f..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-disassemble.exp
+++ /dev/null
@@ -1,238 +0,0 @@
-# Copyright 1999-2005, 2007-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/>.
-
-#
-# Test Machine interface (MI) operations for disassembly.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-disassemble.exp
- return -1
-}
-
-proc test_disassembly_only {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassemble -s $pc -e "$pc+8" -- 0
- # -data-disassembly -f basics.c -l $line_main_body -- 0
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
- "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
- "data-disassemble from pc to pc+12 assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file & line, assembly only"
-}
-
-proc test_disassembly_with_opcodes {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Test disassembly with opcodes for the current function.
- # Tests:
- # -data-disassemble -s $pc -e "$pc+8" -- 2
- # -data-disassembly -f basics.c -l $line_main_body -- 2
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 2" \
- "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}.*\]" \
- "data-disassemble from pc to pc+12 assembly with opcodes"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -- 2" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",opcodes=\".*\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]" \
- "data-disassemble file & line, assembly with opcodes"
-}
-
-proc test_disassembly_lines_limit {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 0
- # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 0
- # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 0
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file, line, number assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 0" \
- "222\\^done,asm_insns=\\\[\\\]" \
- "data-disassemble file, line, number (zero lines) assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file, line, number (more than main lines) assembly only"
-}
-
-
-proc test_disassembly_mixed {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_callee2_head [gdb_get_line_number "callee2 ("]
- set line_callee2_open_brace [expr $line_callee2_head + 1]
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l $line_callee2_open_brace -- 1
- # -data-disassembly -s $pc -e "$pc+8" -- 1
-
- mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 1" \
- "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble file, line assembly mixed"
-
- #
- # In mixed mode, the lowest level of granularity is the source line.
- # So we are going to get the disassembly for the source line at
- # which we are now, even if we have specified that the range is only 2 insns.
- #
- mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \
- "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble range assembly mixed"
-}
-
-proc test_disassembly_mixed_with_opcodes {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_callee2_head [gdb_get_line_number "callee2 ("]
- set line_callee2_open_brace [expr $line_callee2_head + 1]
-
- # Test disassembly mixed with opcodes for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l $line_callee2_open_brace -- 3
- # -data-disassembly -s $pc -e "$pc+8" -- 3
-
- mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 3" \
- "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",opcodes=\".*\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble file, line assembly mixed with opcodes"
-
- #
- # In mixed mode, the lowest level of granularity is the source line.
- # So we are going to get the disassembly for the source line at
- # which we are now, even if we have specified that the range is only 2 insns.
- #
- mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 3" \
- "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble range assembly mixed with opcodes"
-}
-
-proc test_disassembly_mixed_lines_limit {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_open_brace [expr $line_main_head + 1]
- set line_main_body [expr $line_main_head + 2]
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 1
- # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 1
- # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 1
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
- "data-disassemble file, line, number assembly mixed"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_main_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
- "data-disassemble file, line, number (zero lines) assembly mixed"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
- "data-disassemble file, line, number (more than main lines) assembly mixed"
-}
-
-proc test_disassembly_bogus_args {} {
- global mi_gdb_prompt
- global hex
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Test that bogus input to disassembly command is rejected.
- # Tests:
- # -data-disassembly -f foo -l abc -n 0 -- 0
- # -data-disassembly -s foo -e bar -- 0
- # -data-disassembly -s $pc -f basics.c -- 0
- # -data-disassembly -f basics.c -l 32 -- 9
-
- mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \
- "123\\^error,msg=\"-data-disassemble: Invalid filename.\"" \
- "data-disassemble bogus filename"
-
- mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
- "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \
- "data-disassemble bogus address"
-
- mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \
- "456\\^error,msg=\"-data-disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. \\| .-s startaddr -e endaddr.\\) .--. mode.\"" \
- "data-disassemble mix different args"
-
- mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
- "789\\^error,msg=\"-data-disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
- "data-disassemble wrong mode arg"
-
-}
-
-mi_run_to_main
-test_disassembly_only
-test_disassembly_with_opcodes
-test_disassembly_mixed
-test_disassembly_mixed_with_opcodes
-test_disassembly_bogus_args
-test_disassembly_lines_limit
-test_disassembly_mixed_lines_limit
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-eval.exp b/gdb/testsuite/gdb.mi/mi2-eval.exp
deleted file mode 100644
index cb82c739487..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-eval.exp
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2004, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify -data-evaluate-expression. There are really minimal tests.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-eval.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-set line_callee4_head [gdb_get_line_number "callee4 ("]
-set line_callee4_body [expr $line_callee4_head + 2]
-
-mi_runto callee4
-mi_next_to "callee4" "" "basics.c" [expr $line_callee4_body + 1] "next at callee4"
-
-mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
-
-mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval &A"
-
-mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+3"
-
-mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "eval A + 3"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-file.exp b/gdb/testsuite/gdb.mi/mi2-file.exp
deleted file mode 100644
index 56ad708ca51..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-file.exp
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999, 2003-2004, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-file.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_file_cmd ${binfile}
-
-proc test_file_list_exec_source_file {} {
- global srcfile
- global srcdir
- global subdir
- global fullname_syntax
- set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
-
- # get the path and absolute path to the current executable
- #
- # In gdb 6.2 (at least), the default line number is set by
- # select_source_symtab to the first line of "main" minus
- # the value of "lines_to_list" (which defaults to 10) plus one.
- # --chastain 2004-08-13
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
- set gdb_lines_to_list 10
- set line_default [expr $line_main_body - $gdb_lines_to_list + 1]
-
- mi_gdb_test "111-file-list-exec-source-file" \
- "111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"$fullname_syntax${srcfile}\",macro-info=\"0\"" \
- "request path info of current source file (${srcfile})"
-}
-
-test_file_list_exec_source_file
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-pthreads.exp b/gdb/testsuite/gdb.mi/mi2-pthreads.exp
deleted file mode 100644
index 37f325e50b8..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-pthreads.exp
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 2002-2005, 2007-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/>.
-
-# This file tests MI thread commands.
-# Specifically, we are testing the MI command set and the console (in MI)
-# command set ("interpreter-exec") and that the commands that are executed
-# via these command pathways are properly executed. Console commands
-# executed via MI should use MI output wrappers, MI event handlers, etc.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if {[mi_gdb_start]} {
- continue
-}
-
-# This procedure tests the various thread commands in MI.
-proc check_mi_thread_command_set {} {
-
- mi_runto done_making_threads
-
- set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
-
- mi_gdb_test "-thread-select" \
- {\^error,msg="-thread-select: USAGE: threadnum."} \
- "check_mi_thread_command_set: -thread-select"
-
- mi_gdb_test "-thread-select 123456789" \
- {&.*\^error,msg="Thread ID 123456789 not known\."} \
- "check_mi_thread_command_set: -thread-select 123456789"
-
- foreach thread $thread_list {
- # line and file are optional.
- # many of the threads are blocked in libc calls,
- # and many people have libc's with no symbols.
- mi_gdb_test "-thread-select $thread" \
- "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
- "check_mi_thread_command_set: -thread-select $thread"
- }
-}
-
-#
-# Start here
-#
-standard_testfile pthreads.c
-
-set options [list debug]
-if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
- return -1
-}
-
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load $binfile
-
-check_mi_thread_command_set
-
-mi_gdb_exit
-
diff --git a/gdb/testsuite/gdb.mi/mi2-read-memory.exp b/gdb/testsuite/gdb.mi/mi2-read-memory.exp
deleted file mode 100644
index 17c957389a5..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-read-memory.exp
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2003, 2007-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/>.
-
-#
-# test basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile mi-read-memory.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-read-memory.exp
- return -1
-}
-
-
-mi_run_to_main
-mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
-
-mi_gdb_test "1-data-read-memory" \
- "1\\^error,msg=\".*\"" \
- "no arguments"
-
-
-mi_gdb_test "2-data-read-memory bytes x 1 3 2" \
- "2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
- "3x2, one byte"
-
-
-mi_gdb_test "9-data-read-memory -o -6 -- -0+bytes+6 x 1 3 2" \
- "9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
- "3x2, one byte offset by -6"
-
-
-mi_gdb_test "3-data-read-memory \"(shorts + 128)\" x 2 1 2" \
- "3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x0100\",\"0x0102\"\\\]}\\\]" \
- "expression in quotes"
-
-
-mi_gdb_test "4-data-read-memory bytes+16 x 1 8 4 x" \
- "4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x10\",\"0x11\",\"0x12\",\"0x13\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x14\",\"0x15\",\"0x16\",\"0x17\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x20\",\"0x21\",\"0x22\",\"0x23\"\\\],ascii=\" !\\\\\"#\"},{addr=\"$hex\",data=\\\[\"0x24\",\"0x25\",\"0x26\",\"0x27\"\\\],ascii=\"\\$%&'\"},{addr=\"$hex\",data=\\\[\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"\\\],ascii=\"().+\"},{addr=\"$hex\",data=\\\[\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"\\\],ascii=\",-\./\"}\\\]" \
- "ascii and data"
-
-
-mi_gdb_test "5-data-read-memory shorts+64 d 2 1 1" \
- "5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"128\"\\\]}\\\]" \
- "decimal"
-
-mi_gdb_test "6-data-read-memory shorts+64 o 2 1 1" \
- "6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0200\"\\\]}\\\]" \
- "octal"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-regs.exp b/gdb/testsuite/gdb.mi/mi2-regs.exp
deleted file mode 100644
index 8ddf89465af..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-regs.exp
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2003, 2007-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/>.
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and look at registers.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-regs.exp
- return -1
-}
-
-proc sparc_register_tests_no_exec { } {
- # Test the generic IDT chip.
- mi_gdb_test "111-data-list-register-values" \
- ".*111\\^error,msg=\"-data-list-register-values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
- "wrong arguments"
-
- mi_gdb_test "111-data-list-register-values x" \
- ".*111\\^error,msg=\"No registers\.\"" \
- "no executable"
-}
-
-# These tests exercise IDT-specific MIPS registers for several
-# different processor models.
-
-# This should detect the actual processor in use and change
-# the expected results appropriately. FIXME
-
-proc sparc_register_tests { } {
- global hex
- global decimal
- set octal "\[0-7\]+"
- set binary "\[0-1\]+"
- set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
- set float2 "\\-?\[0-9\]+"
-
- mi_gdb_test "111-data-list-register-names" \
- "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fsr\",\"csr\",\"d0\",\"d2\",\"d4\",\"d6\",\"d8\",\"d10\",\"d12\",\"d14\",\"d16\",\"d18\",\"d20\",\"d22\",\"d24\",\"d26\",\"d28\",\"d30\"\\\]" \
- "list register names"
-
- mi_gdb_test "222-data-list-register-values x" \
- "222\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"87\",value=\"$hex\"\}\\\]" \
- "register values x"
-
- mi_gdb_test "333-data-list-register-values f" \
- "333\\^done,register-values=\\\[\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"87\",value=\"$float\"\}\\\]" \
- "register values f"
-
- mi_gdb_test "444-data-list-register-values d" \
- "444\\^done,register-values=\\\[\{number=\"0\",value=\"-?$decimal\"\}.*\{number=\"87\",value=\"-?$decimal\"\}\\\]" \
- "register values d"
-
- mi_gdb_test "555-data-list-register-values o" \
- "555\\^done,register-values=\\\[\{number=\"0\",value=\"$octal\"\}.*\{number=\"87\",value=\"$octal\"\}\\\]" \
- "register values o"
-
- mi_gdb_test "666-data-list-register-values t" \
- "666\\^done,register-values=\\\[\{number=\"0\",value=\"$binary\"\}.*\{number=\"87\",value=\"$binary\"\}\\\]" \
- "register values t"
-
- # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int, 72-87 float
-
- mi_gdb_test "777-data-list-register-values N" \
- "777\\^done,register-values=\\\[\{number=\"0\",value=\"-?$decimal\"\}.*\{number=\"31\",value=\"-?$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"-?$decimal\"\}.*\{number=\"71\",value=\"-?$decimal\"\},\{number=\"72\",value=\"$float\"\}.*\{number=\"87\",value=\"$float\"\}\\\]" \
- "register values N"
-
- mi_gdb_test "888-data-list-register-values r" \
- "888\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"87\",value=\"$hex\"\}\\\]" \
- "register values r"
-
- mi_gdb_test "999-data-list-register-names 68 69 70 71" \
- "999\\^done,register-names=\\\[\"pc\",\"npc\",\"fsr\",\"csr\"\\\]" \
- "list names of some regs"
-
- mi_gdb_test "001-data-list-register-values x 68 69 70 71" \
- "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \
- "list values of some regs"
-
- mi_gdb_test "002-data-list-changed-registers" \
- "002\\^done,changed-registers=\\\[(\"${decimal}\"(,\"${decimal}\")*)?\\\]" \
- "list changed registers"
-}
-
-if [istarget "sparc-*-*"] then {
- sparc_register_tests_no_exec
- mi_run_to_main
- sparc_register_tests
-} else {
- verbose "mi-regs.exp tests ignored for this target"
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-return.exp b/gdb/testsuite/gdb.mi/mi2-return.exp
deleted file mode 100644
index 8d32e139c1b..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-return.exp
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2005, 2007-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/>.
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-return.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-return.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-proc test_return_simple {} {
- global mi_gdb_prompt
- global hex fullname_syntax srcfile
-
- set line_callee3_head [gdb_get_line_number "callee3 ("]
- set line_callee3_call [expr $line_callee3_head + 2]
- set line_callee3_close_brace [expr $line_callee3_head + 3]
-
- mi_gdb_test "111-exec-return" "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"($line_callee3_call|$line_callee3_close_brace)\"\}" "return from callee4 now"
-}
-
-mi_runto callee4
-
-mi_gdb_test "205-break-delete" \
- "205\\^done.*" \
- "delete all breakpoints"
-
-test_return_simple
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-simplerun.exp b/gdb/testsuite/gdb.mi/mi2-simplerun.exp
deleted file mode 100644
index d4bbdab4ba9..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-simplerun.exp
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright 1999-2004, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-simplerun.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- set line_callee4_head [gdb_get_line_number "callee4 ("]
- set line_callee4_body [expr $line_callee4_head + 2]
- set line_callee3_head [gdb_get_line_number "callee3 ("]
- set line_callee3_body [expr $line_callee3_head + 2]
- set line_callee2_head [gdb_get_line_number "callee2 ("]
- set line_callee2_body [expr $line_callee2_head + 2]
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_create_breakpoint "main" 1 keep main ".*basics.c" $line_main_body $hex \
- "break-insert operation"
-
- mi_create_breakpoint "basics.c:callee2" 2 keep callee2 ".*basics.c" $line_callee2_body $hex \
- "insert breakpoint at basics.c:callee2"
-
- mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_head $hex \
- "insert breakpoint at basics.c:\$line_callee3_head"
-
- mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_head $hex \
- "insert breakpoint at \"<fullfilename>\":\$line_callee4_head"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\",original-location=\".*\"\},.*\}\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "205-break-disable 2 3 4" \
- "205\\^done.*" \
- "disabling of breakpoints"
-
- mi_gdb_test "206-break-info 2" \
- "206\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\\\]\}" \
- "list of breakpoints, 16 disabled"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
- # -gdb-set
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" "$line_main_body" \
- {"" "disp=\"keep\"" } "run to main"
-}
-
-proc test_controlled_execution {} {
- global mi_gdb_prompt
- global hex
-
- set line_callee4_head [gdb_get_line_number "callee4 ("]
- set line_callee4_body [expr $line_callee4_head + 2]
- set line_callee3_head [gdb_get_line_number "callee3 ("]
- set line_callee3_call [expr $line_callee3_head + 2]
- set line_callee3_close_brace [expr $line_callee3_head + 3]
- set line_callee1_head [gdb_get_line_number "callee1 ("]
- set line_callee1_body [expr $line_callee1_head + 2]
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Continue execution until a breakpoint is reached, step into calls, verifying
- # if the arguments are correctly shown, continue to the end of a called
- # function, step over a call (next).
- # Tests:
- # -exec-continue
- # -exec-next
- # -exec-step
- # -exec-finish
-
- mi_next_to "main" "" "basics.c" [expr $line_main_body + 1] "next at main"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- # NOTE: The ``\\\\\"'' is for \".
- mi_step_to "callee1" \
- "\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
- "basics.c" "$line_callee1_body" "step at main"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- mi_execute_to "exec-step 3" "end-stepping-range" "callee4" "" \
- "basics.c" $line_callee4_body "" "step to callee4"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- # NOTE: The ``.'' is part of ``gdb-result-var="$1"''
- mi_finish_to "callee3" ".*" "basics.c" \
- "($line_callee3_call|$line_callee3_close_brace)" ".1" "0" "exec-finish"
-}
-
-proc test_controlling_breakpoints {} {
- global mi_gdb_prompt
-
- # Enable, delete, set ignore counts in breakpoints
- # (disable was already tested above)
- # Tests:
- # -break-delete
- # -break-enable
- # -break-after
- # -break-condition
-
-}
-
-proc test_program_termination {} {
- global mi_gdb_prompt
-
- # Run to completion: normal and forced
- # Tests:
- # -exec-abort
- # (normal termination of inferior)
-
- mi_execute_to "exec-continue" "exited-normally" "" "" "" "" "" "continue to end"
-}
-
-test_breakpoints_creation_and_listing
-test_running_the_program
-test_controlled_execution
-test_controlling_breakpoints
-test_program_termination
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-stack.exp b/gdb/testsuite/gdb.mi/mi2-stack.exp
deleted file mode 100644
index 9b79f418139..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-stack.exp
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 2000-2005, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that stack commands work.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile mi-stack.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-stack.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_stack_frame_listing {} {
- global mi_gdb_prompt
- global hex fullname_syntax srcfile
-
- set line_callee4_head [gdb_get_line_number "callee4 ("]
- set line_callee4_body [expr $line_callee4_head + 2]
-
- # Obtain a stack trace
- # Tests:
- # -stack-list-frames
- # -stack-list-frames 1 1
- # -stack-list-frames 1 3
- # -stack-info-frame
-
- mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
- "stack frame listing"
- mi_gdb_test "232-stack-list-frames 1 1" \
- "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
- "stack frame listing 1 1"
- mi_gdb_test "233-stack-list-frames 1 3" \
- "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
- "stack frame listing 1 3"
-
- mi_gdb_test "234-stack-list-frames 1" \
- "234\\^error,msg=\"-stack-list-frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
- "stack frame listing wrong"
-
- mi_gdb_test "235-stack-info-frame" \
- "235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\}" \
- "selected frame listing"
-
- mi_gdb_test "236-stack-list-frames 1 300" \
- "236\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
- "stack frame listing 1 300"
-}
-
-proc test_stack_args_listing {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain lists for args for the stack frames
- # Tests:
- # -stack-list-arguments 0
- # -stack-list-arguments 0 1 1
- # -stack-list-arguments 0 1 3
- # -stack-list-arguments 1
- # -stack-list-arguments 1 1 1
- # -stack-list-arguments 1 1 3
- # -stack-list-arguments
-
- mi_gdb_test "231-stack-list-arguments 0" \
- "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 0"
-
- mi_gdb_test "232-stack-list-arguments 0 1 1" \
- "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\}\\\]" \
- "stack args listing 0 1 1"
-
- mi_gdb_test "233-stack-list-arguments 0 1 3" \
- "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\}\\\]" \
- "stack args listing 0 1 3"
-
- mi_gdb_test "231-stack-list-arguments 1" \
- "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 1"
-
- mi_gdb_test "232-stack-list-arguments 1 1 1" \
- "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\}\\\]" \
- "stack args listing 1 1 1"
-
- mi_gdb_test "233-stack-list-arguments 1 1 3" \
- "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\}\\\]" \
- "stack args listing 1 1 3"
-
- mi_gdb_test "234-stack-list-arguments" \
- "234\\^error,msg=\"-stack-list-arguments: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
- "stack args listing wrong"
-
- mi_gdb_test "235-stack-list-arguments 1 1 300" \
- "235\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 1 1 300"
-}
-
-proc test_stack_info_depth {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain depth of stack
- # Tests:
- # -stack-info-depth
- # -stack-info-depth 3
- # -stack-info-depth 99
-
- mi_gdb_test "231-stack-info-depth" \
- "231\\^done,depth=\"5\"" \
- "stack info-depth"
-
- mi_gdb_test "231-stack-info-depth 3" \
- "231\\^done,depth=\"3\"" \
- "stack info-depth 3"
-
- mi_gdb_test "231-stack-info-depth 99" \
- "231\\^done,depth=\"5\"" \
- "stack info-depth 99"
-
- mi_gdb_test "231-stack-info-depth 99 99" \
- "231\\^error,msg=\"-stack-info-depth: Usage: .MAX_DEPTH.\"" \
- "stack info-depth wrong usage"
-}
-
-proc test_stack_locals_listing {} {
- global mi_gdb_prompt
- global hex fullname_syntax srcfile
-
- # Obtain lists for locals for the stack frames
- # Tests:
- # -stack-list-locals 0 (--no-values)
- # -stack-list-locals 1 (--all-values)
- # -stack-list-locals 2 (--simple-values)
- # -stack-list-arguments
-
- mi_gdb_test "232-stack-list-locals 0" \
- "232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\",name=\"D\"\\\]" \
- "stack locals listing of names"
-
-set line_callee4_return_0 [gdb_get_line_number "return 0;"]
-
-# step until A, B, C, D have some reasonable values.
-mi_execute_to "exec-next 4" "end-stepping-range" "callee4" "" ".*${srcfile}" $line_callee4_return_0 ""\
- "next's in callee4"
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\},\{name=\"D\",value=\"\\{0, 1, 2\\}\"\}\\\]" \
- "stack locals listing of names and values"
-
- mi_gdb_test "232-stack-list-locals 2" \
- "232\\^done,locals=\\\[\{name=\"A\",type=\"int\",value=\"1\"\},\{name=\"B\",type=\"int\",value=\"2\"\},\{name=\"C\",type=\"int\",value=\"3\"\},\{name=\"D\",type=\"int \\\[3\\\]\"\}\\\]" \
- "stack locals listing, simple types: names and values, complex type: names and types"
-
- mi_gdb_test "234-stack-list-locals" \
- "234\\^error,msg=\"-stack-list-locals: Usage.*PRINT_VALUES.*\"" \
- "stack locals listing wrong"
-
- mi_gdb_test "232-stack-select-frame 1" \
- "232\\^done" \
- "stack select frame 1"
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\\\]" \
- "stack locals listing for new frame"
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\\\]" \
- "stack locals for same frame (level 1)"
-}
-
-mi_runto callee4
-test_stack_frame_listing
-test_stack_args_listing
-test_stack_locals_listing
-test_stack_info_depth
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-stepi.exp b/gdb/testsuite/gdb.mi/mi2-stepi.exp
deleted file mode 100644
index d2cbb0b0ad6..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-stepi.exp
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2005, 2007-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/>.
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-step-instruction and exec-next-instruction.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-stepi.exp
- return -1
-}
-
-proc test_stepi_nexti {} {
- global mi_gdb_prompt
- global hex fullname_syntax srcfile
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
- set line_main_hello [gdb_get_line_number "Hello, World!"]
-
- set line [mi_execute_to "exec-step-instruction" "end-stepping-range" "main" "" \
- ".*basics.c" "\[0-9\]+" "" "step-instruction at main"]
- if { $line >= $line_main_body && $line <= $line_main_hello } {
- pass "step-instruction at main (line check)"
- } else {
- fail "step-instruction at main (line check)"
- }
-
- set line [mi_execute_to "exec-next-instruction" "end-stepping-range" "main" "" \
- ".*basics.c" "\[0-9\]+" "" "next-instruction at main"]
- if { $line >= $line_main_body && $line <= $line_main_hello } {
- pass "next-instruction at main (line check)"
- } else {
- fail "next-instruction at main (line check)"
- }
-
- set line [mi_execute_to "exec-next-instruction" "end-stepping-range" "main" "" \
- ".*basics.c" "\[0-9\]+" "" "next-instruction at main 2"]
- if { $line >= $line_main_body && $line <= $line_main_hello } {
- pass "next-instruction at main 2 (line check)"
- } else {
- fail "next-instruction at main 2 (line check)"
- }
-}
-
-mi_run_to_main
-test_stepi_nexti
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp b/gdb/testsuite/gdb.mi/mi2-syn-frame.exp
deleted file mode 100644
index 9c24cca4f12..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2002-2003, 2005, 2007-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/>.
-
-# Test MI output with synthetic frames on the stack (call dummies,
-# signal handlers).
-
-if [target_info exists gdb,nosignals] {
- verbose "Skipping mi-syn-frame.exp because of nosignals."
- continue
-}
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-standard_testfile mi-syn-frame.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-syn-frame.exp
- return -1
-}
-
-set my_mi_gdb_prompt "\\(gdb\\)\[ \]*\[\r\n\]*"
-
-mi_gdb_exit
-mi_gdb_start
-mi_run_to_main
-
-mi_create_breakpoint "foo" 2 keep foo ".*mi-syn-frame.c" $decimal $hex \
- "insert breakpoint foo"
-
-#
-# Call foo() by hand, where we'll hit a breakpoint.
-#
-
-mi_gdb_test "401-data-evaluate-expression foo()" ".*401\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nEvaluation of the expression containing the function\\\\n\\(foo\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \
- "call inferior's function with a breakpoint set in it"
-
-mi_gdb_test "402-stack-list-frames" "402\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" "backtrace from inferior function stopped at bp, showing gdb dummy frame"
-
-#
-# Continue back to main()
-#
-
-mi_send_resuming_command "exec-continue" "testing exec continue"
-
-mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
-
-mi_gdb_test "404-stack-list-frames 0 0" \
- "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
- "list stack frames"
-
-
-#
-# Call have_a_very_merry_interrupt() which will eventually raise a signal
-# that's caught by handler() which calls subroutine().
-
-mi_create_breakpoint "subroutine" 3 keep subroutine ".*mi-syn-frame.c" $decimal $hex \
- "insert breakpoint subroutine"
-
-mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
- ".*406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nEvaluation of the expression containing the function\\\\n\\(have_a_very_merry_interrupt\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \
- "evaluate expression have_a_very_merry_interrupt"
-
-# We should have both a signal handler and a call dummy frame
-# in this next output.
-
-mi_gdb_test "407-stack-list-frames" \
- "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" \
- "list stack frames"
-
-mi_send_resuming_command "exec-continue" "testing exec continue"
-
-mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
-
-mi_gdb_test "409-stack-list-frames 0 0" \
- "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
- "list stack frames"
-
-#
-# Call bar() by hand, which should get an exception while running.
-#
-
-mi_gdb_test "410-data-evaluate-expression bar()" ".*410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\".\\\\nEvaluation of the expression containing the function\\\\n\\(bar\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" "call inferior function which raises exception"
-
-mi_gdb_test "411-stack-list-frames" "411\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
-
-mi_gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-until.exp b/gdb/testsuite/gdb.mi/mi2-until.exp
deleted file mode 100644
index e1abc4afe2f..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-until.exp
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2001, 2003, 2005, 2007-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/>.
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-until.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile until.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-until.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_to_foo {} {
- global mi_gdb_prompt
- global hex
-
- mi_create_breakpoint "10" 1 "keep" foo ".*until.c" 10 ".*" \
- "break-insert operation"
-
- mi_run_cmd
- mi_expect_stop "breakpoint-hit" "foo" "" ".*until.c" 10 \
- { "" "disp=\"keep\"" } "run to main"
-
- mi_gdb_test "100-break-delete 1" "100\\^done" "break-delete 1"
-
-}
-
-proc test_until {} {
- global mi_gdb_prompt
- global hex fullname_syntax srcfile
-
- setup_kfail gdb/2104 "*-*-*"
- mi_execute_to "exec-until" "end-stepping-range" "foo" "" ".*until.c" "12" "" \
- "until after while loop"
-
- mi_execute_to "exec-until 15" "location-reached" "foo" "" ".*until.c" "15" ""\
- "until line number"
-
- mi_execute_to "exec-until until.c:17" "location-reached" "foo" "" ".*until.c" "17" ""\
- "until line number:file"
-
- # This is supposed to NOT stop at line 25. It stops right after foo is over.
- mi_execute_to "exec-until until.c:25" "location-reached" "main" "" ".*until.c" "(23|24)" ""\
- "until after current function"
-}
-
-test_running_to_foo
-test_until
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-var-block.exp b/gdb/testsuite/gdb.mi/mi2-var-block.exp
deleted file mode 100644
index 6999db68256..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-var-block.exp
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2004, 2007-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/>.
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile var-cmd.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-var-block.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_runto do_block_tests
-
-# Test: c_variable-3.2
-# Desc: create cb and foo
-mi_create_varobj "cb" "cb" "create local variable cb"
-
-mi_gdb_test "-var-create foo * foo" \
- "\\^error,msg=\"-var-create: unable to create variable object\"" \
- "create local variable foo"
-
-# step to "foo = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "foo = 123;"] \
- "step at do_block_test"
-
-
-# Be paranoid and assume 3.2 created foo
-mi_gdb_test "-var-delete foo" \
- "\\^error,msg=\"Variable object not found\"" \
- "delete var foo"
-
-
-# Test: c_variable-3.3
-# Desc: create foo
-mi_create_varobj "foo" "foo" "create local variable foo"
-
-# step to "foo2 = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "foo2 = 123;"] \
- "step at do_block_test"
-
-# Test: c_variable-3.4
-# Desc: check foo, cb changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"cb\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: cb foo changed"
-
-# step to "foo = 321;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "foo = 321;"] \
- "step at do_block_test"
-
-# Test: c_variable-3.5
-# Desc: create inner block foo
-mi_create_varobj "inner_foo" "foo" "create local variable inner_foo"
-
-# step to "foo2 = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "foo2 = 0;"] \
- "step at do_block_test"
-
-# Test: c_variable-3.6
-# Desc: create foo2
-mi_create_varobj "foo2" "foo2" "create local variable foo2"
-
-# Test: c_variable-3.7
-# Desc: check that outer foo in scope and inner foo out of scope
-# Note: also a known gdb problem
-setup_xfail *-*-*
-mi_gdb_test "-var-update inner_foo" \
- "\\^done,changelist=\{FIXME\}" \
- "update inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-setup_xfail *-*-*
-mi_gdb_test "-var-evaluate-expression inner_foo" \
- "\\^done,value=\{FIXME\}" \
- "evaluate inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-mi_gdb_test "-var-update foo" \
- "\\^done,changelist=\\\[\\\]" \
- "update foo: did not change"
-
-mi_gdb_test "-var-delete inner_foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var inner_foo"
-
-# step to "foo = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "foo = 0;"] \
- "step at do_block_test"
-
-# Test: c_variable-3.8
-# Desc: check that foo2 out of scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
- "\\^done,changelist=\{FIXME\}" \
- "update foo2: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-# step to "cb = 21;"
-mi_step_to "do_block_tests" "" "var-cmd.c" \
- [gdb_get_line_number "cb = 21;"] \
- "step at do_block_test"
-
-# Test: c_variable-3.9
-# Desc: check that only cb is in scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
- "\\^done,changelist=\\\[FIXME\\\]" \
- "update foo2 should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo" \
- "\\^done,changelist=\{FIXME\}" \
- "update foo should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-mi_gdb_test "-var-update cb" \
- "\\^done,changelist=\\\[\\\]" \
- "update cb"
-
-# Test: c_variable-3.10
-# Desc: names of editable variables
-#gdbtk_test c_variable-3.10 {names of editable variables} {
-# editable_variables
-#} {{foo cb foo2} {}}
-
-# Done with block tests
-mi_gdb_test "-var-delete foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo"
-
-mi_gdb_test "-var-delete foo2" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo2"
-
-mi_gdb_test "-var-delete cb" \
- "\\^done,ndeleted=\"1\"" \
- "delete var cb"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp
deleted file mode 100644
index 5af2af83e77..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp
+++ /dev/null
@@ -1,529 +0,0 @@
-# Copyright 1999-2004, 2004, 2007-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/>.
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile var-cmd.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-var-cmd.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-##### #####
-# #
-# Variable Creation tests #
-# #
-##### #####
-
-# Test: c_variable-1.1
-# Desc: Create global variable
-
-mi_create_varobj "global_simple" "global_simple" "create global variable"
-
-# Test: c_variable-1.2
-# Desc: Create non-existent variable
-
-mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
- "112\\^error,msg=\"-var-create: unable to create variable object\"" \
- "create non-existent variable"
-
-# Test: c_variable-1.3
-# Desc: Create out of scope variable
-
-mi_gdb_test "113-var-create argc * argc" \
- "113\\^error,msg=\"-var-create: unable to create variable object\"" \
- "create out of scope variable"
-
-mi_runto do_locals_tests
-
-set line_dlt_first_real [gdb_get_line_number "linteger = 1234;"]
-
-mi_continue_to_line $line_dlt_first_real "step to real start of do_locals_test"
-
-
-# Test: c_variable-1.4
-# Desc: create local variables
-
-mi_create_varobj_checked linteger linteger int "create local variable linteger"
-
-mi_create_varobj_checked lpinteger lpinteger {int \*} "create local variable lpinteger"
-
-mi_create_varobj_checked lcharacter lcharacter\[0\] char "create local variable lcharacter"
-
-mi_create_varobj_checked lpcharacter lpcharacter {char \*} "create local variable lpcharacter"
-
-mi_create_varobj_checked llong llong "long int" "create local variable llong"
-
-mi_create_varobj_checked lplong lplong {long int \*} "create local variable lplong"
-
-mi_create_varobj_checked lfloat lfloat float "create local variable lfloat"
-
-mi_create_varobj_checked lpfloat lpfloat {float \*} "create local variable lpfloat"
-
-mi_create_varobj_checked ldouble ldouble double "create local variable ldouble"
-
-mi_create_varobj_checked lpdouble lpdouble {double \*} "create local variable lpdouble"
-
-mi_create_varobj_checked lsimple lsimple "struct _simple_struct" "create local variable lsimple"
-
-mi_create_varobj_checked lpsimple lpsimple {struct _simple_struct \*} "create local variable lpsimple"
-
-mi_create_varobj_checked func func {void \(\*\)\((void|)\)} "create local variable func"
-
-# Test: c_variable-1.5
-# Desc: create lsimple.character
-mi_create_varobj_checked lsimple.character lsimple.character "char" \
- "create lsimple.character"
-
-# Test: c_variable-1.6
-# Desc: create lpsimple->integer
-mi_create_varobj_checked lsimple->integer lsimple->integer "int" \
- "create lsimple->integer"
-
-# Test: c_variable-1.7
-# Desc: crate lsimple.integer
-mi_create_varobj_checked lsimple.integer lsimple.integer "int" \
- "create lsimple.integer"
-
-
-# Test: c_variable-1.9
-# Desc: create type name
-# Type names (like int, long, etc..) are all proper expressions to gdb.
-# make sure variable code does not allow users to create variables, though.
-mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"-var-create: unable to create variable object\"" \
- "create int"
-
-
-##### #####
-# #
-# Value changed tests #
-# #
-##### #####
-
-# Test: c_variable-2.1
-# Desc: check whether values changed at do_block_tests
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\\\]" \
- "update all vars"
-
-# Step over "linteger = 1234;"
-set line_dlt_linteger [gdb_get_line_number "lpinteger = &linteger;"]
-mi_step_to "do_locals_tests" "" "var-cmd.c" $line_dlt_linteger "step at do_locals_test"
-
-# Test: c_variable-2.2
-# Desc: check whether only linteger changed values
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: linteger changed"
-
-# Step over "lpinteger = &linteger;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 1] "step at do_locals_tests (2)"
-
-# Test: c_variable-2.3
-# Desc: check whether only lpinteger changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: lpinteger changed"
-
-# Step over "lcharacter = 'a';"
-mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 2] "step at do_locals_tests (3)"
-
-# Test: c_variable-2.4
-# Desc: check whether only lcharacter changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: lcharacter changed"
-
-# Step over "lpcharacter = &lcharacter;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 3] "step at do_locals_tests (4)"
-
-# Test: c_variable-2.5
-# Desc: check whether only lpcharacter changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: lpcharacter changed"
-
-
-# Step over:
-# llong = 2121L;
-# lplong = &llong;
-# lfloat = 2.1;
-# lpfloat = &lfloat;
-# ldouble = 2.718281828459045;
-# lpdouble = &ldouble;
-# lsimple.integer = 1234;
-# lsimple.unsigned_integer = 255;
-# lsimple.character = 'a';
-
-mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" [expr $line_dlt_linteger + 12] "" "step at do_locals_tests (5)"
-
-# Test: c_variable-2.6
-# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
-# lsimple.unsigned_character lsimple.integer lsimple.character changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lplong\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: many changed"
-
-# Step over:
-# lsimple.signed_character = 21;
-# lsimple.char_ptr = &lcharacter;
-# lpsimple = &lsimple;
-# func = nothing;
-
-set line_dlt_4321 [gdb_get_line_number "linteger = 4321;"]
-
-mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" $line_dlt_4321 "" "step at do_locals_tests (6)"
-
-# Test: c_variable-2.7
-# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"func\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: func and lpsimple changed"
-
-# Step over
-# linteger = 4321;
-# lcharacter = 'b';
-# llong = 1212L;
-# lfloat = 1.2;
-# ldouble = 5.498548281828172;
-# lsimple.integer = 255;
-# lsimple.unsigned_integer = 4321;
-# lsimple.character = 'b';
-
-mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" [expr $line_dlt_4321 + 8] "" "step at do_locals_tests (7)"
-
-# Test: c_variable-2.8
-# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
-# lpsimple.integer lsimple.character changed
-# Note: this test also checks that lpsimple->integer and lsimple.integer have
-# changed (they are the same)
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: lsimple and others changed"
-
-
-###
-#
-# Test assignment to variables. More tests on assignment are in other files.
-#
-###
-mi_gdb_test "-var-assign global_simple 0" \
- "\\^error,msg=\"-var-assign: Variable object is not editable\"" \
- "assign to global_simple"
-
-mi_gdb_test "-var-assign linteger 3333" \
- "\\^done,value=\"3333\"" \
- "assign to linteger"
-
-# Allow lpcharacter to update, optionally. Because it points to a
-# char variable instead of a zero-terminated string, if linteger is
-# directly after it in memory the printed characters may appear to
-# change.
-set lpchar_update "\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\},"
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[($lpchar_update)?\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: linteger changed after assign"
-
-mi_gdb_test "-var-assign linteger 3333" \
- "\\^done,value=\"3333\"" \
- "assign to linteger again, same value"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\\\]" \
- "update all vars: linteger not changed after same assign"
-
-mi_gdb_test "-var-evaluate-expression linteger" \
- "\\^done,value=\"3333\"" \
- "eval linteger"
-
-mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
- "\\^done,value=\"$hex\"" \
- "assign to lpinteger"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: lpinteger changed after assign"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\\\]" \
- "update all vars: no changes on second update"
-
-mi_gdb_test "-var-evaluate-expression lpinteger" \
- "\\^done,value=\"$hex\"" \
- "eval lpinteger"
-
-# reset the values to the original ones so that the rest of the file doesn't suffer.
-
-mi_gdb_test "-var-assign linteger 4321" \
- "\\^done,value=\"4321\"" \
- "assign to linteger"
-
-mi_gdb_test "-var-assign lpinteger &linteger" \
- "\\^done,value=\"$hex\"" \
- "assign to lpinteger"
-
-mi_gdb_test "-var-assign lcharacter 'z'" \
- "\\^done,value=\"122 'z'\"" \
- "assign to lcharacter"
-
-mi_gdb_test "-var-evaluate-expression lcharacter" \
- "\\^done,value=\"122 'z'\"" \
- "eval lcharacter"
-
-mi_gdb_test "-var-assign llong 1313L" \
- "\\^done,value=\"1313\"" \
- "assign to llong"
-mi_gdb_test "-var-evaluate-expression llong" \
- "\\^done,value=\"1313\"" \
- "eval llong"
-mi_gdb_test "-var-assign llong 1212L" \
- "\\^done,value=\"1212\"" \
- "assign to llong"
-
-mi_gdb_test "-var-assign lplong &llong+4" \
- "\\^done,value=\"$hex\"" \
- "assign to lplong"
-mi_gdb_test "-var-evaluate-expression lplong" \
- "\\^done,value=\"$hex\"" \
- "eval lplong"
-mi_gdb_test "-var-assign lplong &llong" \
- "\\^done,value=\"$hex\"" \
- "assign to lplong"
-
-mi_gdb_test "-var-assign lfloat 3.4567" \
- "\\^done,value=\"3.45.*\"" \
- "assign to lfloat"
-mi_gdb_test "-var-evaluate-expression lfloat" \
- "\\^done,value=\"3.45.*\"" \
- "eval lfloat"
-mi_gdb_test "-var-assign lfloat 1.2345" \
- "\\^done,value=\"1.23.*\"" \
- "assign to lfloat"
-
-mi_gdb_test "-var-assign lpfloat &lfloat+4" \
- "\\^done,value=\"$hex\"" \
- "assign to lpfloat"
-
-mi_gdb_test "-var-assign ldouble 5.333318284590435" \
- "\\^done,value=\"5.333318284590435\"" \
- "assign to ldouble"
-
-mi_gdb_test "-var-assign func do_block_tests" \
- "\\^done,value=\"$hex <do_block_tests>\"" \
- "assign to func"
-
-mi_gdb_test "-var-assign lsimple.character 'd'" \
- "\\^done,value=\"100 'd'\"" \
- "assign to lsimple.character"
-
-mi_gdb_test "-var-assign lsimple->integer 222" \
- "\\^done,value=\"222\"" \
- "assign to lsimple->integer"
-
-mi_gdb_test "-var-assign lsimple.integer 333" \
- "\\^done,value=\"333\"" \
- "assign to lsimple.integer"
-
-######
-# End of assign tests
-#####
-
-set line_subroutine1_body [gdb_get_line_number "global_simple.integer = i + 3;"]
-
-mi_continue_to "subroutine1"
-
-# Test: c_variable-2.10
-# Desc: create variable for locals i,l in subroutine1
-mi_create_varobj_checked i i int "create i"
-
-mi_create_varobj_checked l l {long int \*} "create l"
-
-# Test: c_variable-2.11
-# Desc: create do_locals_tests local in subroutine1
-mi_gdb_test "-var-create linteger * linteger" \
- "\\^error,msg=\"-var-create: unable to create variable object\"" \
- "create linteger"
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" [expr $line_subroutine1_body + 1] "step at subroutine1"
-
-# Test: c_variable-2.12
-# Desc: change global_simple.integer
-# Note: This also tests whether we are reporting changes in structs properly.
-# gdb normally would say that global_simple has changed, but we
-# special case that, since it is not what a human expects to
-# see.
-
-setup_xfail *-*-*
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{FIXME: WHAT IS CORRECT HERE\}" \
- "update all vars: changed FIXME"
-clear_xfail *-*-*
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" [expr $line_subroutine1_body + 2] "step at subroutine1 (2)"
-
-# Test: c_variable-2.13
-# Desc: change subroutine1 local i
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"i\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: i changed"
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" [expr $line_subroutine1_body + 3] "step at subroutine1 (3)"
-
-# Test: c_variable-2.14
-# Desc: change do_locals_tests local llong
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: llong changed"
-
-set line_dlt_call_subroutine1 [gdb_get_line_number "subroutine1 (linteger, &llong);"]
-mi_next_to "do_locals_tests" "" "var-cmd.c" \
- [expr $line_dlt_call_subroutine1 + 1] "next out of subroutine1"
-
-# Test: c_variable-2.15
-# Desc: check for out of scope subroutine1 locals
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"l\",in_scope=\"false\"\,type_changed=\"false\",has_more=\"0\"},\{name=\"i\",in_scope=\"false\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
- "update all vars: all now out of scope"
-
-# Done with locals/globals tests. Erase all variables
-#delete_all_variables
-mi_gdb_test "-var-delete global_simple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var"
-
-mi_gdb_test "-var-delete linteger" \
- "\\^done,ndeleted=\"1\"" \
- "delete var linteger"
-
-mi_gdb_test "-var-delete lpinteger" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpinteger"
-
-mi_gdb_test "-var-delete lcharacter" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lcharacter"
-
-mi_gdb_test "-var-delete lpcharacter" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpcharacter"
-
-mi_gdb_test "-var-delete llong" \
- "\\^done,ndeleted=\"1\"" \
- "delete var llong"
-
-mi_gdb_test "-var-delete lplong" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lplong"
-
-mi_gdb_test "-var-delete lfloat" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lfloat"
-
-mi_gdb_test "-var-delete lpfloat" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpfloat"
-
-mi_gdb_test "-var-delete ldouble" \
- "\\^done,ndeleted=\"1\"" \
- "delete var ldouble"
-
-mi_gdb_test "-var-delete lpdouble" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpdouble"
-
-mi_gdb_test "-var-delete lsimple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple"
-
-mi_gdb_test "-var-delete lpsimple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpsimple"
-
-mi_gdb_test "-var-delete func" \
- "\\^done,ndeleted=\"1\"" \
- "delete var func"
-
-mi_gdb_test "-var-delete lsimple.character" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple.character"
-
-mi_gdb_test "-var-delete lsimple->integer" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple->integer"
-
-mi_gdb_test "-var-delete lsimple.integer" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple.integer"
-
-mi_gdb_test "-var-delete i" \
- "\\^done,ndeleted=\"1\"" \
- "delete var i"
-
-mi_gdb_test "-var-delete l" \
- "\\^done,ndeleted=\"1\"" \
- "delete var l"
-
-# Test whether we can follow the name of a variable through multiple
-# stack frames.
-mi_continue_to do_special_tests
-
-mi_gdb_test "-var-create selected_a @ a" \
- {\^done,name="selected_a",numchild="0",value=".*",type="int".*} \
- "create selected_a"
-
-mi_continue_to incr_a
-
-mi_gdb_test "-var-update selected_a" \
- "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",type_changed=\"true\",new_type=\"char\",new_num_children=\"0\"\,has_more=\"0\"}\\\]" \
- "update selected_a in incr_a"
-
-mi_next "step a line in incr_a"
-mi_next "return from incr_a to do_special_tests"
-
-mi_gdb_test "-var-update selected_a" \
- "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",type_changed=\"true\",new_type=\"int\",new_num_children=\"0\",has_more=\"0\"\}\\\]" \
- "update selected_a in do_special_tests"
-
-mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\^done" \
- "floating varobj invalidation"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-var-display.exp b/gdb/testsuite/gdb.mi/mi2-var-display.exp
deleted file mode 100644
index 4bb1cd89963..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-var-display.exp
+++ /dev/null
@@ -1,631 +0,0 @@
-# Copyright 1999-2005, 2007-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/>.
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile var-cmd.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-var-display.exp
- return -1
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-set line_dct_end [gdb_get_line_number "{int a = 0;}"]
-
-mi_create_breakpoint "$srcfile:$line_dct_end" 1 keep do_children_tests ".*var-cmd.c" $line_dct_end $hex \
- "break-insert operation"
-
-mi_run_cmd
-mi_expect_stop "breakpoint-hit" "do_children_tests" "" ".*var-cmd.c" \
- $line_dct_end { "" "disp=\"keep\"" } "run to main"
-
-##### #####
-# #
-# Display tests #
-# #
-##### #####
-
-# Test: c_variable-6.1
-# Desc: create variable bar
-mi_create_varobj bar bar "create local variable bar"
-
-# Test: c_variable-6.2
-# Desc: type of variable bar
-mi_gdb_test "-var-info-type bar" \
- "\\^done,type=\"int\"" \
- "info type variable bar"
-
-# Test: c_variable-6.3
-# Desc: format of variable bar
-mi_gdb_test "-var-show-format bar" \
- "\\^done,format=\"natural\"" \
- "show format variable bar"
-
-# Test: c_variable-6.4
-# Desc: value of variable bar
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"2121\"" \
- "eval variable bar"
-
-# Test: c_variable-6.5
-# Desc: change format of bar to hex
-mi_gdb_test "-var-set-format bar hexadecimal" \
- "\\^done,format=\"hexadecimal\",value=\"0x849\"" \
- "set format variable bar"
-
-# Test: c_variable-6.6
-# Desc: value of bar with new format
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"0x849\"" \
- "eval variable bar with new format"
-
-# Test: c_variable-6.7
-# Desc: change value of bar
-mi_gdb_test "-var-assign bar 3" \
- "\\^done,value=\"0x3\"" \
- "assing to variable bar"
-
-mi_gdb_test "-var-set-format bar decimal" \
- "\\^done,format=\"decimal\",value=\"3\"" \
- "set format variable bar"
-
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"3\"" \
- "eval variable bar with new value"
-
-mi_gdb_test "-var-delete bar" \
- "\\^done,ndeleted=\"1\"" \
- "delete var bar"
-
-# Test: c_variable-6.11
-# Desc: create variable foo
-mi_create_varobj foo foo "create local variable foo"
-
-# Test: c_variable-6.12
-# Desc: type of variable foo
-mi_gdb_test "-var-info-type foo" \
- "\\^done,type=\"int \\*\"" \
- "info type variable foo"
-
-# Test: c_variable-6.13
-# Desc: format of variable foo
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"natural\"" \
- "show format variable foo"
-
-# Test: c_variable-6.14
-# Desc: value of variable foo
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"$hex\"" \
- "eval variable foo"
-
-# Test: c_variable-6.15
-# Desc: change format of var to octal
-mi_gdb_test "-var-set-format foo octal" \
- "\\^done,format=\"octal\",value=\"$octal\"" \
- "set format variable foo"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"octal\"" \
- "show format variable foo"
-
-# Test: c_variable-6.16
-# Desc: value of foo with new format
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"\[0-7\]+\"" \
- "eval variable foo"
-
-# Test: c_variable-6.17
-# Desc: change value of foo
-mi_gdb_test "-var-assign foo 3" \
- "\\^done,value=\"03\"" \
- "assing to variable foo"
-
-mi_gdb_test "-var-set-format foo decimal" \
- "\\^done,format=\"decimal\",value=\"3\"" \
- "set format variable foo"
-
-# Test: c_variable-6.18
-# Desc: check new value of foo
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"3\"" \
- "eval variable foo"
-
-# Test: c_variable-6.19
-# Desc: check optional format parameter of var-evaluate-expression
-# and check that current format is not changed
-mi_gdb_test "-var-evaluate-expression -f hex foo" \
- "\\^done,value=\"0x3\"" \
- "eval variable foo in hex"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"decimal\"" \
- "show format variable foo after eval in hex"
-
-mi_gdb_test "-var-evaluate-expression -f octal foo" \
- "\\^done,value=\"03\"" \
- "eval variable foo in octal"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"decimal\"" \
- "show format variable foo after eval in octal"
-
-mi_gdb_test "-var-evaluate-expression -f decimal foo" \
- "\\^done,value=\"3\"" \
- "eval variable foo in decimal"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"decimal\"" \
- "show format variable foo after eval in decimal"
-
-mi_gdb_test "-var-evaluate-expression -f nat foo" \
- "\\^done,value=\"0x3\"" \
- "eval variable foo in natural"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"decimal\"" \
- "show format variable foo after eval in natural"
-
-mi_gdb_test "-var-evaluate-expression -f bin foo" \
- "\\^done,value=\"11\"" \
- "eval variable foo in binary"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"decimal\"" \
- "show format variable foo after eval in binary"
-
-mi_gdb_test "-var-delete foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo"
-
-# Test: c_variable-6.21
-# Desc: create variable weird and children
-mi_create_varobj weird weird "create local variable weird"
-
-mi_list_varobj_children weird {
- {weird.integer integer 0 int}
- {weird.character character 0 char}
- {weird.char_ptr char_ptr 1 "char \\*"}
- {weird.long_int long_int 0 "long int"}
- {weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"}
- {weird.long_array long_array 10 "long int \\[10\\]"}
- {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"}
- {weird.func_ptr_struct func_ptr_struct 0 \
- "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long int\\))?"}
- {weird.func_ptr_ptr func_ptr_ptr 0 \
- "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)"}
- {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"}
- {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"}
-} "get children local variable weird"
-
-
-# Test: c_variable-6.23
-# Desc: change format of weird.func_ptr and weird.func_ptr_ptr
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\",value=\"$hex\"" \
- "set format variable weird.func_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr" \
- "\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\",value=\"$hex\"" \
- "set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
- "\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr_ptr"
-
-# Test: c_variable-6.24
-# Desc: format of weird and children
-mi_gdb_test "-var-set-format weird natural" \
- "\\^done,format=\"natural\",value=\"$hex\"" \
- "set format variable weird"
-
-mi_gdb_test "-var-set-format weird.integer natural" \
- "\\^done,format=\"natural\",value=\"123\"" \
- "set format variable weird.integer"
-
-mi_gdb_test "-var-set-format weird.character natural" \
- "\\^done,format=\"natural\",value=\"0 '\\\\\\\\000'\"" \
- "set format variable weird.character"
-
-mi_gdb_test "-var-set-format weird.char_ptr natural" \
- "\\^done,format=\"natural\",value=\"$hex \\\\\"hello\\\\\"\"" \
- "set format variable weird.char_ptr"
-
-mi_gdb_test "-var-set-format weird.long_int natural" \
- "\\^done,format=\"natural\",value=\"0\"" \
- "set format variable weird.long_int"
-
-mi_gdb_test "-var-set-format weird.int_ptr_ptr natural" \
- "\\^done,format=\"natural\",value=\"$hex\"" \
- "set format variable weird.int_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.long_array natural" \
- "\\^done,format=\"natural\",value=\"\\\[10\\\]\"" \
- "set format variable weird.long_array"
-
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\",value=\"$hex\"" \
- "set format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
- "\\^done,format=\"hexadecimal\",value=\"$hex\"" \
- "set format variable weird.func_ptr_struct"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \
- "\\^done,format=\"natural\",value=\"0x0\"" \
- "set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.u1 natural" \
- "\\^done,format=\"natural\",value=\"\{...\}\"" \
- "set format variable weird.u1"
-
-mi_gdb_test "-var-set-format weird.s2 natural" \
- "\\^done,format=\"natural\",value=\"\{...\}\"" \
- "set format variable weird.s2"
-
-# Test: c_variable-6.25
-# Desc: value of weird and children
-#gdbtk_test c_variable-6.25 {value of weird and children} {
-# set values {}
-# foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] {
-# lappend values [value $v $f]
-# }
-
-# set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.26
-# Desc: change format of weird and children to octal
-#gdbtk_test c_variable-6.26 {change format of weird and children to octal} {
-# set formats {}
-# foreach v [lsort [array names var]] {
-# $var($v) format octal
-# lappend formats [$var($v) format]
-# }
-
-# set formats
-#} {octal octal octal octal octal octal octal octal octal octal octal octal}
-
-# Test: c_variable-6.27
-# Desc: value of weird and children with new format
-#gdbtk_test c_variable-6.27 {value of foo with new format} {
-# set values {}
-# foreach v [lsort [array names var]] {
-# lappend values [value $v o]
-# }
-
-# set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.30
-# Desc: create more children of weird
-#gdbtk_test c_variable-6.30 {create more children of weird} {
-# foreach v [array names var] {
-# get_children $v
-# }
-
-# # Do it twice to get more children
-# foreach v [array names var] {
-# get_children $v
-# }
-
-# lsort [array names var]
-#} {weird weird.char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.c weird.u1.d}
-
-# Test: c_variable-6.31
-# Desc: check that all children of weird change
-# Ok, obviously things like weird.s2 and weird.u1 will not change!
-#gdbtk_test *c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} {
-# $var(weird) value 0x2121
-# check_update
-#} {{weird.integer weird.character weird.char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9} {weird.s2.i weird.s2.u2 weird weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.s2 weird.long_array weird.u1} {}}
-
-mi_gdb_test "-var-delete weird" \
- "\\^done,ndeleted=\"12\"" \
- "delete var weird"
-
-
-##### #####
-# #
-# Special Display Tests #
-# #
-##### #####
-
-# Stop in "do_special_tests"
-
-set line_dst_incr_a_2 [gdb_get_line_number "incr_a(2);"]
-
-mi_create_breakpoint "$line_dst_incr_a_2" 2 keep do_special_tests ".*var-cmd.c" $line_dst_incr_a_2 $hex \
- "break-insert operation 2"
-
-mi_execute_to "exec-continue" "breakpoint-hit" "do_special_tests" "" \
- ".*var-cmd.c" $line_dst_incr_a_2 { "" "disp=\"keep\"" } \
- "continue to do_special_tests"
-
-# Test: c_variable-7.10
-# Desc: create union u
-mi_create_varobj u u "create local variable u"
-
-# Test: c_variable-7.11
-# Desc: value of u
-mi_gdb_test "-var-evaluate-expression u" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable u"
-
-# Test: c_variable-7.12
-# Desc: type of u
-mi_gdb_test "-var-info-type u" \
- "\\^done,type=\"union named_union\"" \
- "info type variable u"
-
-# Test: c_variable-7.13
-# Desc: is u editable
-mi_gdb_test "-var-show-attributes u" \
- "\\^done,attr=\"noneditable\"" \
- "is u editable"
-
-# Test: c_variable-7.14
-# Desc: number of children of u
-mi_gdb_test "-var-info-num-children u" \
- "\\^done,numchild=\"2\"" \
- "get number of children of u"
-
-# Test: c_variable-7.15
-# Desc: children of u
-mi_list_varobj_children u {
- {u.integer integer 0 int}
- {u.char_ptr char_ptr 1 {char \*}}
-} "get children of u"
-
-# Test: c_variable-7.20
-# Desc: create anonu
-mi_create_varobj anonu anonu "create local variable anonu"
-
-# Test: c_variable-7.21
-# Desc: value of anonu
-mi_gdb_test "-var-evaluate-expression anonu" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable anonu"
-
-# Test: c_variable-7.22
-# Desc: type of anonu
-mi_gdb_test "-var-info-type anonu" \
- "\\^done,type=\"union \{\\.\\.\\.\}\"" \
- "info type variable anonu"
-
-# Test: c_variable-7.23
-# Desc: is anonu editable
-mi_gdb_test "-var-show-attributes anonu" \
- "\\^done,attr=\"noneditable\"" \
- "is anonu editable"
-
-# Test: c_variable-7.24
-# Desc: number of children of anonu
-mi_gdb_test "-var-info-num-children anonu" \
- "\\^done,numchild=\"3\"" \
- "get number of children of anonu"
-
-# Test: c_variable-7.25
-# Desc: children of anonu
-mi_list_varobj_children "anonu" {
- {anonu.a a 0 int}
- {anonu.b b 0 char}
- {anonu.c c 0 "long int"}
-} "get children of anonu"
-
-# Test: c_variable-7.30
-# Desc: create struct s
-mi_create_varobj s s "create local variable s"
-
-
-# Test: c_variable-7.31
-# Desc: value of s
-mi_gdb_test "-var-evaluate-expression s" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable s"
-
-# Test: c_variable-7.32
-# Desc: type of s
-mi_gdb_test "-var-info-type s" \
- "\\^done,type=\"struct _simple_struct\"" \
- "info type variable s"
-
-# Test: c_variable-7.33
-# Desc: is s editable
-mi_gdb_test "-var-show-attributes s" \
- "\\^done,attr=\"noneditable\"" \
- "is s editable"
-
-# Test: c_variable-7.34
-# Desc: number of children of s
-mi_gdb_test "-var-info-num-children s" \
- "\\^done,numchild=\"6\"" \
- "get number of children of s"
-
-# Test: c_variable-7.35
-# Desc: children of s
-mi_list_varobj_children s {
- {s.integer integer 0 int}
- {s.unsigned_integer unsigned_integer 0 "unsigned int"}
- {s.character character 0 char}
- {s.signed_character signed_character 0 "signed char"}
- {s.char_ptr char_ptr 1 {char \*}}
- {s.array_of_10 array_of_10 10 {int \[10\]}}
-} "get children of s"
-#} {integer unsigned_integer character signed_character char_ptr array_of_10}
-
-# Test: c_variable-7.40
-# Desc: create anons
-mi_create_varobj anons anons "create local variable anons"
-
-# Test: c_variable-7.41
-# Desc: value of anons
-mi_gdb_test "-var-evaluate-expression anons" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable anons"
-
-# Test: c_variable-7.42
-# Desc: type of anons
-mi_gdb_test "-var-info-type anons" \
- "\\^done,type=\"struct \{\\.\\.\\.\}\"" \
- "info type variable anons"
-
-# Test: c_variable-7.43
-# Desc: is anons editable
-mi_gdb_test "-var-show-attributes anons" \
- "\\^done,attr=\"noneditable\"" \
- "is anons editable"
-
-# Test: c_variable-7.44
-# Desc: number of children of anons
-mi_gdb_test "-var-info-num-children anons" \
- "\\^done,numchild=\"3\"" \
- "get number of children of anons"
-
-# Test: c_variable-7.45
-# Desc: children of anons
-mi_list_varobj_children anons {
- {anons.a a 0 int}
- {anons.b b 0 char}
- {anons.c c 0 "long int"}
-} "get children of anons"
-
-# Test: c_variable-7.50
-# Desc: create enum e
-mi_create_varobj e e "create local variable e"
-
-# Test: c_variable-7.51
-# Desc: value of e
-mi_gdb_test "-var-evaluate-expression e" \
- "\\^done,value=\"bar\"" \
- "eval variable e"
-
-# Test: c_variable-7.52
-# Desc: type of e
-mi_gdb_test "-var-info-type e" \
- "\\^done,type=\"enum foo\"" \
- "info type variable e"
-
-# Test: c_variable-7.53
-# Desc: is e editable
-mi_gdb_test "-var-show-attributes e" \
- "\\^done,attr=\"editable\"" \
- "is e editable"
-
-# Test: c_variable-7.54
-# Desc: number of children of e
-mi_gdb_test "-var-info-num-children e" \
- "\\^done,numchild=\"0\"" \
- "get number of children of e"
-
-# Test: c_variable-7.55
-# Desc: children of e
-mi_gdb_test "-var-list-children e" \
- "\\^done,numchild=\"0\",has_more=\"0\"" \
- "get children of e"
-
-# Test: c_variable-7.60
-# Desc: create anone
-mi_create_varobj anone anone "create local variable anone"
-
-# Test: c_variable-7.61
-# Desc: value of anone
-mi_gdb_test "-var-evaluate-expression anone" \
- "\\^done,value=\"A\"" \
- "eval variable anone"
-
-# Test: c_variable-7.70
-# Desc: create anone
-mi_gdb_test "-var-create anone * anone" \
- "\\^error,msg=\"Duplicate variable object name\"" \
- "create duplicate local variable anone"
-
-
-# Test: c_variable-7.72
-# Desc: type of anone
-mi_gdb_test "-var-info-type anone" \
- "\\^done,type=\"enum \{\\.\\.\\.\}\"" \
- "info type variable anone"
-
-
-# Test: c_variable-7.73
-# Desc: is anone editable
-mi_gdb_test "-var-show-attributes anone" \
- "\\^done,attr=\"editable\"" \
- "is anone editable"
-
-# Test: c_variable-7.74
-# Desc: number of children of anone
-mi_gdb_test "-var-info-num-children anone" \
- "\\^done,numchild=\"0\"" \
- "get number of children of anone"
-
-# Test: c_variable-7.75
-# Desc: children of anone
-mi_gdb_test "-var-list-children anone" \
- "\\^done,numchild=\"0\",has_more=\"0\"" \
- "get children of anone"
-
-
-# Record fp
-if ![mi_gdb_test "p/x \$fp" ".*($hex).*\\^done" "print FP register"] {
- set fp $expect_out(3,string)
-}
-
-mi_continue_to "incr_a"
-
-# Test: c_variable-7.81
-# Desc: Create variables in different scopes
-mi_gdb_test "-var-create a1 * a" \
- "\\^done,name=\"a1\",numchild=\"0\",value=\".*\",type=\"char\".*" \
- "create local variable a1"
-
-mi_gdb_test "-var-create a2 $fp a" \
- "\\^done,name=\"a2\",numchild=\"0\",value=\".*\",type=\"int\".*" \
- "create variable a2 in different scope"
-
-#gdbtk_test c_variable-7.81 {create variables in different scopes} {
-# set a1 [gdb_variable create -expr a]
-# set a2 [gdb_variable create -expr a -frame $fp]
-
-# set vals {}
-# lappend vals [$a1 value]
-# lappend vals [$a2 value]
-# set vals
-#} {2 1}
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-watch.exp b/gdb/testsuite/gdb.mi/mi2-watch.exp
deleted file mode 100644
index 5a56c8e7cc2..00000000000
--- a/gdb/testsuite/gdb.mi/mi2-watch.exp
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2004, 2007-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/>.
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi2"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-standard_testfile basics.c
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested mi2-watch.exp
- return -1
-}
-
-proc test_watchpoint_creation_and_listing {type} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- set line_callee4_head [gdb_get_line_number "callee4 ("]
- set line_callee4_body [expr $line_callee4_head + 2]
-
- # Insert a watchpoint and list
- # Tests:
- # -break-watch C
- # -break-list
-
- mi_gdb_test "111-break-watch C" \
- "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \
- "break-watch operation"
-
- mi_gdb_test "222-break-list" \
- "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",what=\"C\",times=\"0\",original-location=\"C\"\}\\\]\}" \
- "list of watchpoints"
-
-}
-
-# UNUSED at the time
-proc test_awatch_creation_and_listing {type} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Insert an access watchpoint and list it
- # Tests:
- # -break-watch -a A
- # -break-list
-
- mi_gdb_test "333-break-watch -a A" \
- "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
- "break-watch -a operation"
-
- mi_gdb_test "444-break-list" \
- "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
- "list of watchpoints awatch"
-
- mi_gdb_test "777-break-delete 3" \
- "777\\^done" \
- "delete access watchpoint"
-}
-
-# UNUSED at the time
-proc test_rwatch_creation_and_listing {type} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- set line_main_head [gdb_get_line_number "main ("]
- set line_main_body [expr $line_main_head + 2]
-
- # Insert a read watchpoint and list it.
- # Tests:
- # -break-insert -r B
- # -break-list
-
- mi_gdb_test "200-break-watch -r C" \
- "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
- "break-insert -r operation"
-
- mi_gdb_test "300-break-list" \
- "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\}\}" \
- "list of breakpoints"
-
- mi_gdb_test "177-break-delete 4" \
- "177\\^done" \
- "delete read watchpoint"
-}
-
-proc test_watchpoint_triggering {type} {
- global mi_gdb_prompt
- global hex
-
- set line_callee4_return_0 [gdb_get_line_number "return 0;"]
- set line_callee3_head [gdb_get_line_number "callee3 ("]
- set line_callee3_close_brace [expr $line_callee3_head + 3]
-
- # Continue execution until the watchpoint is reached, continue again,
- # to see the watchpoint go out of scope.
- # Does:
- # -exec-continue (Here wp triggers)
- # -exec-continue (Here wp goes out of scope)
-
- mi_execute_to "exec-continue" "watchpoint-trigger" "callee4" "" \
- ".*basics.c" $line_callee4_return_0 \
- {"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \
- "watchpoint trigger"
-
- if { $type == "sw" } {
- setup_xfail *-*-*
- }
- mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \
- ".*basics.c" $line_callee3_close_brace \
- {"" "wpnum=\"2\""} \
- "watchpoint trigger"
- clear_xfail *-*-*
-}
-
-proc test_watchpoint_all {type} { with_test_prefix "$type" {
- upvar srcdir srcdir
- upvar subdir subdir
- upvar binfile binfile
-
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
-
- mi_runto callee4
- test_watchpoint_creation_and_listing $type
- #test_rwatch_creation_and_listing $type
- #test_awatch_creation_and_listing $type
- test_watchpoint_triggering $type
-}}
-
-# Run the tests twice, once using software watchpoints...
-mi_gdb_test "567-gdb-set can-use-hw-watchpoints 0" \
- "567\\^done" \
- "hw watchpoints toggle (1)"
-test_watchpoint_all sw
-
-mi_gdb_exit
-
-# ... and unless requested otherwise...
-if [target_info exists gdb,no_hardware_watchpoints] {
- return 0
-}
-
-mi_gdb_start
-
-# ... once using hardware watchpoints (if available).
-mi_gdb_test "890-gdb-set can-use-hw-watchpoints 1" \
- "890\\^done" \
- "hw watchpoints toggle (2)"
-test_watchpoint_all hw
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index bc20ee471db..4442e79c050 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -160,3 +160,4 @@ gdb_test "python print a\[0\].is_valid()" "True" "Test symbol validity"
delete_breakpoints
gdb_unload
gdb_test "python print a\[0\].is_valid()" "False" "Test symbol validity"
+gdb_test_no_output "python a = None" "Test symbol destructor"
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index da0c3e4be29..0d3a5f2d83a 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -73,3 +73,6 @@ gdb_test "python print \"simple_struct\" in static_symbols" "True" "Test simple_
gdb_unload
gdb_test "python print sal.is_valid()" "False" "Test sal.is_valid"
gdb_test "python print symtab.is_valid()" "False" "Test symtab.is_valid()"
+
+gdb_test_no_output "python sal = None" "Test sal destructor"
+gdb_test_no_output "python symtab = None" "Test symtab destructor"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 8715c5ee2f1..f27d4a7d86b 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -148,7 +148,7 @@ proc gdb_unload {} {
}
-re "$gdb_prompt $" {}
timeout {
- perror "couldn't unload file in $GDB (timed out)."
+ perror "couldn't unload file in $GDB (timeout)."
return -1
}
}
@@ -334,29 +334,44 @@ proc gdb_start_cmd {args} {
# Set a breakpoint at FUNCTION. If there is an additional argument it is
# a list of options; the supported options are allow-pending, temporary,
-# and no-message.
+# message, no-message, and passfail.
+# The result is 1 for success, 0 for failure.
+#
+# Note: The handling of message vs no-message is messed up, but it's based
+# on historical usage. By default this function does not print passes,
+# only fails.
+# no-message: turns off printing of fails (and passes, but they're already off)
+# message: turns on printing of passes (and fails, but they're already on)
proc gdb_breakpoint { function args } {
global gdb_prompt
global decimal
set pending_response n
- if {[lsearch -exact [lindex $args 0] allow-pending] != -1} {
+ if {[lsearch -exact $args allow-pending] != -1} {
set pending_response y
}
set break_command "break"
set break_message "Breakpoint"
- if {[lsearch -exact [lindex $args 0] temporary] != -1} {
+ if {[lsearch -exact $args temporary] != -1} {
set break_command "tbreak"
set break_message "Temporary breakpoint"
}
- set no_message 0
- if {[lsearch -exact [lindex $args 0] no-message] != -1} {
- set no_message 1
+ set print_pass 0
+ set print_fail 1
+ set no_message_loc [lsearch -exact $args no-message]
+ set message_loc [lsearch -exact $args message]
+ # The last one to appear in args wins.
+ if { $no_message_loc > $message_loc } {
+ set print_fail 0
+ } elseif { $message_loc > $no_message_loc } {
+ set print_pass 1
}
+ set test_name "setting breakpoint at $function"
+
send_gdb "$break_command $function\n"
# The first two regexps are what we get with -g, the third is without -g.
gdb_expect 30 {
@@ -365,8 +380,8 @@ proc gdb_breakpoint { function args } {
-re "$break_message \[0-9\]* at .*$gdb_prompt $" {}
-re "$break_message \[0-9\]* \\(.*\\) pending.*$gdb_prompt $" {
if {$pending_response == "n"} {
- if { $no_message == 0 } {
- fail "setting breakpoint at $function"
+ if { $print_fail } {
+ fail $test_name
}
return 0
}
@@ -376,23 +391,34 @@ proc gdb_breakpoint { function args } {
exp_continue
}
-re "A problem internal to GDB has been detected" {
- fail "setting breakpoint at $function in runto (GDB internal error)"
+ if { $print_fail } {
+ fail "$test_name (GDB internal error)"
+ }
gdb_internal_error_resync
return 0
}
-re "$gdb_prompt $" {
- if { $no_message == 0 } {
- fail "setting breakpoint at $function"
+ if { $print_fail } {
+ fail $test_name
+ }
+ return 0
+ }
+ eof {
+ if { $print_fail } {
+ fail "$test_name (eof)"
}
return 0
}
timeout {
- if { $no_message == 0 } {
- fail "setting breakpoint at $function (timeout)"
+ if { $print_fail } {
+ fail "$test_name (timeout)"
}
return 0
}
}
+ if { $print_pass } {
+ pass $test_name
+ }
return 1;
}
@@ -400,8 +426,15 @@ proc gdb_breakpoint { function args } {
# Since this is the only breakpoint that will be set, if it stops
# at a breakpoint, we will assume it is the one we want. We can't
# just compare to "function" because it might be a fully qualified,
-# single quoted C++ function specifier. If there's an additional argument,
-# pass it to gdb_breakpoint.
+# single quoted C++ function specifier.
+#
+# If there are additional arguments, pass them to gdb_breakpoint.
+# We recognize no-message/message ourselves.
+# The default is no-message.
+# no-message is messed up here, like gdb_breakpoint: to preserve
+# historical usage fails are always printed by default.
+# no-message: turns off printing of fails (and passes, but they're already off)
+# message: turns on printing of passes (and fails, but they're already on)
proc runto { function args } {
global gdb_prompt
@@ -409,7 +442,28 @@ proc runto { function args } {
delete_breakpoints
- if ![gdb_breakpoint $function [lindex $args 0]] {
+ # Default to "no-message".
+ set args "no-message $args"
+
+ set print_pass 0
+ set print_fail 1
+ set no_message_loc [lsearch -exact $args no-message]
+ set message_loc [lsearch -exact $args message]
+ # The last one to appear in args wins.
+ if { $no_message_loc > $message_loc } {
+ set print_fail 0
+ } elseif { $message_loc > $no_message_loc } {
+ set print_pass 1
+ }
+
+ set test_name "running to $function in runto"
+
+ # We need to use eval here to pass our varargs args to gdb_breakpoint
+ # which is also a varargs function.
+ # But we also have to be careful because $function may have multiple
+ # elements, and we don't want Tcl to move the remaining elements after
+ # the first to $args. That is why $function is wrapped in {}.
+ if ![eval gdb_breakpoint {$function} $args] {
return 0;
}
@@ -419,33 +473,52 @@ proc runto { function args } {
# the "in func" output we get without -g.
gdb_expect 30 {
-re "Break.* at .*:$decimal.*$gdb_prompt $" {
+ if { $print_pass } {
+ pass $test_name
+ }
return 1
}
-re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" {
+ if { $print_pass } {
+ pass $test_name
+ }
return 1
}
-re "The target does not support running in non-stop mode.\r\n$gdb_prompt $" {
- unsupported "Non-stop mode not supported"
+ if { $print_fail } {
+ unsupported "Non-stop mode not supported"
+ }
return 0
}
-re ".*A problem internal to GDB has been detected" {
- fail "running to $function in runto (GDB internal error)"
+ if { $print_fail } {
+ fail "$test_name (GDB internal error)"
+ }
gdb_internal_error_resync
return 0
}
-re "$gdb_prompt $" {
- fail "running to $function in runto"
+ if { $print_fail } {
+ fail $test_name
+ }
return 0
}
eof {
- fail "running to $function in runto (end of file)"
+ if { $print_fail } {
+ fail "$test_name (eof)"
+ }
return 0
}
timeout {
- fail "running to $function in runto (timeout)"
+ if { $print_fail } {
+ fail "$test_name (timeout)"
+ }
return 0
}
}
+ if { $print_pass } {
+ pass $test_name
+ }
return 1
}
@@ -455,7 +528,7 @@ proc runto { function args } {
# If you don't want that, use gdb_start_cmd.
proc runto_main { } {
- return [runto main]
+ return [runto main no-message]
}
### Continue, and expect to hit a breakpoint.
@@ -508,6 +581,8 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} {
proc gdb_internal_error_resync {} {
global gdb_prompt
+ verbose -log "Resyncing due to internal error."
+
set count 0
while {$count < 10} {
gdb_expect {
@@ -1218,6 +1293,7 @@ proc gdb_file_cmd { arg } {
global GDB
global last_loaded_file
+ # Save this for the benefit of gdbserver-support.exp.
set last_loaded_file $arg
# Set whether debug info was found.
@@ -1250,12 +1326,12 @@ proc gdb_file_cmd { arg } {
send_gdb "file $arg\n"
gdb_expect 120 {
-re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
- verbose "\t\tLoaded $arg into the $GDB with no debugging symbols"
+ verbose "\t\tLoaded $arg into $GDB with no debugging symbols"
set gdb_file_cmd_debug_info "nodebug"
return 0
}
-re "Reading symbols from.*done.*$gdb_prompt $" {
- verbose "\t\tLoaded $arg into the $GDB"
+ verbose "\t\tLoaded $arg into $GDB"
set gdb_file_cmd_debug_info "debug"
return 0
}
@@ -1268,9 +1344,13 @@ proc gdb_file_cmd { arg } {
return 0
}
timeout {
- perror "(timeout) Couldn't load $arg, other program already loaded."
+ perror "Couldn't load $arg, other program already loaded (timeout)."
return -1
}
+ eof {
+ perror "Couldn't load $arg, other program already loaded (eof)."
+ return -1
+ }
}
}
-re "No such file or directory.*$gdb_prompt $" {
@@ -1278,23 +1358,23 @@ proc gdb_file_cmd { arg } {
return -1
}
-re "A problem internal to GDB has been detected" {
- fail "($arg) GDB internal error"
+ fail "($arg) (GDB internal error)"
gdb_internal_error_resync
return -1
}
-re "$gdb_prompt $" {
- perror "couldn't load $arg into $GDB."
+ perror "Couldn't load $arg into $GDB."
return -1
}
timeout {
- perror "couldn't load $arg into $GDB (timed out)."
+ perror "Couldn't load $arg into $GDB (timeout)."
return -1
}
eof {
# This is an attempt to detect a core dump, but seems not to
# work. Perhaps we need to match .* followed by eof, in which
# gdb_expect does not seem to have a way to do that.
- perror "couldn't load $arg into $GDB (end of file)."
+ perror "Couldn't load $arg into $GDB (eof)."
return -1
}
}
@@ -3321,7 +3401,7 @@ proc get_debug_format { } {
return 1;
}
timeout {
- warning "couldn't check debug format (timed out)."
+ warning "couldn't check debug format (timeout)."
return 1;
}
}
diff --git a/gdb/version.in b/gdb/version.in
index 2be18aeddcf..f8ddcd8f3bc 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-7.5.50.20120930-cvs
+7.5.50.20121015-cvs
diff --git a/include/ChangeLog b/include/ChangeLog
index 4a535eb2535..e702ebe6189 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,13 @@
+2012-10-08 Jason Merrill <jason@redhat.com>
+
+ * demangle.h (enum demangle_component_type): Add
+ DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER.
+
+2012-09-18 Florian Weimer <fweimer@redhat.com>
+
+ PR other/54411
+ * objalloc.h (objalloc_alloc): Do not use fast path on wraparound.
+
2012-09-27 Anthony Green <green@moxielogic.com>
* opcode/moxie.h (MOXIE_BAD): New define.
diff --git a/include/demangle.h b/include/demangle.h
index 34b3ed3cde9..5da79d85221 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -272,6 +272,9 @@ enum demangle_component_type
/* A guard variable. This has one subtree, the name for which this
is a guard variable. */
DEMANGLE_COMPONENT_GUARD,
+ /* The init and wrapper functions for C++11 thread_local variables. */
+ DEMANGLE_COMPONENT_TLS_INIT,
+ DEMANGLE_COMPONENT_TLS_WRAPPER,
/* A reference temporary. This has one subtree, the name for which
this is a temporary. */
DEMANGLE_COMPONENT_REFTEMP,
diff --git a/include/objalloc.h b/include/objalloc.h
index 36772d17b50..52857663ba2 100644
--- a/include/objalloc.h
+++ b/include/objalloc.h
@@ -1,5 +1,5 @@
/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997, 2001 Free Software Foundation, Inc.
+ Copyright 1997-2012 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
@@ -91,7 +91,7 @@ extern void *_objalloc_alloc (struct objalloc *, unsigned long);
if (__len == 0) \
__len = 1; \
__len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \
- (__len <= __o->current_space \
+ (__len != 0 && __len <= __o->current_space \
? (__o->current_ptr += __len, \
__o->current_space -= __len, \
(void *) (__o->current_ptr - __len)) \
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index ce5c71de075..5e77fbdea68 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,12 @@
+2012-10-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Use "cX" completer instead of "cx" in fstqx
+ opcodes. Likewise, use "cM" instead of "cm" in fstqs opcodes.
+
+2012-10-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * s390.h (s390_opcode_cpu_val): Add S390_OPCODE_ZEC12.
+
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* ia64.h (ia64_opnd): Add new operand types.
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
index 90732064497..489ca550d7e 100644
--- a/include/opcode/hppa.h
+++ b/include/opcode/hppa.h
@@ -895,8 +895,8 @@ static const struct pa_opcode pa_opcodes[] =
{ "fstdx", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa11, FLAG_STRICT},
{ "fstdx", 0x2c000200, 0xfc00dfc0, "cxft,x(b)", pa10, 0},
{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc00dfc0, "cxft,x(b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
+{ "fstqx", 0x3c000200, 0xfc00dfc0, "cXft,x(b)", pa10, 0},
+{ "fstqx", 0x3c000200, 0xfc001fc0, "cXft,x(s,b)", pa10, 0},
{ "fldws", 0x24001000, 0xfc00df80, "cm5(b),fT", pa10, FLAG_STRICT},
{ "fldws", 0x24001000, 0xfc001f80, "cm5(s,b),fT", pa10, FLAG_STRICT},
{ "fldws", 0x24001000, 0xfc00d380, "cmcc5(b),fT", pa11, FLAG_STRICT},
@@ -921,8 +921,8 @@ static const struct pa_opcode pa_opcodes[] =
{ "fstds", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa11, FLAG_STRICT},
{ "fstds", 0x2c001200, 0xfc00dfc0, "cmft,5(b)", pa10, 0},
{ "fstds", 0x2c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc00dfc0, "cmft,5(b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
+{ "fstqs", 0x3c001200, 0xfc00dfc0, "cMft,5(b)", pa10, 0},
+{ "fstqs", 0x3c001200, 0xfc001fc0, "cMft,5(s,b)", pa10, 0},
{ "fadd", 0x30000600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
{ "fadd", 0x38000600, 0xfc00e720, "IfA,fB,fT", pa10, 0},
{ "fsub", 0x30002600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index ed70830c148..531011e0fa5 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -40,6 +40,7 @@ enum s390_opcode_cpu_val
S390_OPCODE_Z9_EC,
S390_OPCODE_Z10,
S390_OPCODE_Z196,
+ S390_OPCODE_ZEC12,
S390_OPCODE_MAXCPU
};
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 9afed435855..303dda23cae 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,26 @@
+2012-10-08 Jason Merrill <jason@redhat.com>
+
+ * cp-demangle.c (d_special_name, d_dump): Handle TH and TW.
+ (d_make_comp, d_print_comp): Likewise.
+
+2012-09-18 Ian Lance Taylor <iant@google.com>
+
+ * strnlen.c: New file.
+ * configure.ac: Check for strnlen, add it to AC_LIBOBJ if it's not
+ present.
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Add strnlen.c.
+ (CONFIGURED_OFILES): Add ./strnlen.$(objext).
+ * configure, config.in, functions.texi: Rebuild.
+
+ * maint-tool: Accept .def files in the include directory.
+
+2012-09-18 Florian Weimer <fweimer@redhat.com>
+
+ PR other/54411
+ * objalloc.c (_objalloc_alloc): Add overflow check covering
+ alignment and CHUNK_HEADER_SIZE addition.
+
2011-08-28 H.J. Lu <hongjiu.lu@intel.com>
* argv.c (dupargv): Replace malloc with xmalloc. Don't check
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 0a5da3178b1..1ba8cf1ccb2 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -151,7 +151,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
spaces.c splay-tree.c stack-limit.c stpcpy.c stpncpy.c \
strcasecmp.c strchr.c strdup.c strerror.c strncasecmp.c \
strncmp.c strrchr.c strsignal.c strstr.c strtod.c strtol.c \
- strtoul.c strndup.c strverscmp.c \
+ strtoul.c strndup.c strnlen.c strverscmp.c \
timeval-utils.c tmpnam.c \
unlink-if-ordinary.c \
vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
@@ -215,9 +215,9 @@ CONFIGURED_OFILES = ./asprintf.$(objext) ./atexit.$(objext) \
./sigsetmask.$(objext) ./snprintf.$(objext) \
./stpcpy.$(objext) ./stpncpy.$(objext) ./strcasecmp.$(objext) \
./strchr.$(objext) ./strdup.$(objext) ./strncasecmp.$(objext) \
- ./strncmp.$(objext) ./strndup.$(objext) ./strrchr.$(objext) \
- ./strstr.$(objext) ./strtod.$(objext) ./strtol.$(objext) \
- ./strtoul.$(objext) ./strverscmp.$(objext) \
+ ./strncmp.$(objext) ./strndup.$(objext) ./strnlen.$(objext) \
+ ./strrchr.$(objext) ./strstr.$(objext) ./strtod.$(objext) \
+ ./strtol.$(objext) ./strtoul.$(objext) ./strverscmp.$(objext) \
./tmpnam.$(objext) \
./vasprintf.$(objext) ./vfork.$(objext) ./vfprintf.$(objext) \
./vprintf.$(objext) ./vsnprintf.$(objext) ./vsprintf.$(objext) \
@@ -622,8 +622,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/crc32.c $(OUTPUT_OPTION)
-./dwarfnames.$(objext): $(srcdir)/dwarfnames.c $(INCDIR)/dwarf2.h \
- $(INCDIR)/dwarf2.def
+./dwarfnames.$(objext): $(srcdir)/dwarfnames.c $(INCDIR)/dwarf2.def \
+ $(INCDIR)/dwarf2.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/dwarfnames.c -o pic/$@; \
else true; fi
@@ -656,7 +656,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION)
-./filename_cmp.$(objext): $(srcdir)/filename_cmp.c config.h $(INCDIR)/filenames.h \
+./filename_cmp.$(objext): $(srcdir)/filename_cmp.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/filename_cmp.c -o pic/$@; \
@@ -757,7 +758,7 @@ $(CONFIGURED_OFILES): stamp-picdir
$(COMPILE.c) $(srcdir)/insque.c $(OUTPUT_OPTION)
./lbasename.$(objext): $(srcdir)/lbasename.c config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/lbasename.c -o pic/$@; \
@@ -1043,7 +1044,7 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/splay-tree.c $(OUTPUT_OPTION)
-./stack-limit.$(objext): $(srcdir)/stack-limit.c config.h
+./stack-limit.$(objext): $(srcdir)/stack-limit.c config.h $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/stack-limit.c -o pic/$@; \
else true; fi
@@ -1104,6 +1105,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/strndup.c $(OUTPUT_OPTION)
+./strnlen.$(objext): $(srcdir)/strnlen.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strnlen.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strnlen.c $(OUTPUT_OPTION)
+
./strrchr.$(objext): $(srcdir)/strrchr.c $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/strrchr.c -o pic/$@; \
diff --git a/libiberty/config.in b/libiberty/config.in
index 17c4c2e4414..1cf9c11b6ee 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -262,6 +262,9 @@
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
+/* Define to 1 if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
diff --git a/libiberty/configure b/libiberty/configure
index 6e98352f356..536702742dd 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5340,6 +5340,7 @@ funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
funcs="$funcs strndup"
+funcs="$funcs strnlen"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
@@ -5380,8 +5381,8 @@ if test "x" = "y"; then
random realpath rename rindex \
sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
stpcpy stpncpy strcasecmp strchr strdup \
- strerror strncasecmp strndup strrchr strsignal strstr strtod strtol \
- strtoul strverscmp sysconf sysctl sysmp \
+ strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \
+ strtol strtoul strverscmp sysconf sysctl sysmp \
table times tmpnam \
vasprintf vfprintf vprintf vsprintf \
wait3 wait4 waitpid
@@ -5663,6 +5664,12 @@ esac
esac
case " $LIBOBJS " in
+ *" strnlen.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
+ ;;
+esac
+
+ case " $LIBOBJS " in
*" strverscmp.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strverscmp.$ac_objext"
;;
@@ -5683,7 +5690,7 @@ esac
for f in $funcs; do
case "$f" in
- asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
+ asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid)
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 754b66a0619..c7638942644 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -322,6 +322,7 @@ funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
funcs="$funcs strndup"
+funcs="$funcs strnlen"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
@@ -362,8 +363,8 @@ if test "x" = "y"; then
random realpath rename rindex \
sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
stpcpy stpncpy strcasecmp strchr strdup \
- strerror strncasecmp strndup strrchr strsignal strstr strtod strtol \
- strtoul strverscmp sysconf sysctl sysmp \
+ strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \
+ strtol strtoul strverscmp sysconf sysctl sysmp \
table times tmpnam \
vasprintf vfprintf vprintf vsprintf \
wait3 wait4 waitpid)
@@ -442,13 +443,14 @@ if test -n "${with_target_subdir}"; then
AC_LIBOBJ([stpcpy])
AC_LIBOBJ([stpncpy])
AC_LIBOBJ([strndup])
+ AC_LIBOBJ([strnlen])
AC_LIBOBJ([strverscmp])
AC_LIBOBJ([vasprintf])
AC_LIBOBJ([waitpid])
for f in $funcs; do
case "$f" in
- asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
+ asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid)
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 258aaa71550..32df38c6024 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -696,6 +696,12 @@ d_dump (struct demangle_component *dc, int indent)
case DEMANGLE_COMPONENT_PACK_EXPANSION:
printf ("pack expansion\n");
break;
+ case DEMANGLE_COMPONENT_TLS_INIT:
+ printf ("tls init function\n");
+ break;
+ case DEMANGLE_COMPONENT_TLS_WRAPPER:
+ printf ("tls wrapper function\n");
+ break;
}
d_dump (d_left (dc), indent + 2);
@@ -832,6 +838,8 @@ d_make_comp (struct d_info *di, enum demangle_component_type type,
case DEMANGLE_COMPONENT_COVARIANT_THUNK:
case DEMANGLE_COMPONENT_JAVA_CLASS:
case DEMANGLE_COMPONENT_GUARD:
+ case DEMANGLE_COMPONENT_TLS_INIT:
+ case DEMANGLE_COMPONENT_TLS_WRAPPER:
case DEMANGLE_COMPONENT_REFTEMP:
case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
case DEMANGLE_COMPONENT_TRANSACTION_CLONE:
@@ -1867,6 +1875,14 @@ d_special_name (struct d_info *di)
return d_make_comp (di, DEMANGLE_COMPONENT_JAVA_CLASS,
cplus_demangle_type (di), NULL);
+ case 'H':
+ return d_make_comp (di, DEMANGLE_COMPONENT_TLS_INIT,
+ d_name (di), NULL);
+
+ case 'W':
+ return d_make_comp (di, DEMANGLE_COMPONENT_TLS_WRAPPER,
+ d_name (di), NULL);
+
default:
return NULL;
}
@@ -4072,6 +4088,16 @@ d_print_comp (struct d_print_info *dpi, int options,
d_print_comp (dpi, options, d_left (dc));
return;
+ case DEMANGLE_COMPONENT_TLS_INIT:
+ d_append_string (dpi, "TLS init function for ");
+ d_print_comp (dpi, options, d_left (dc));
+ return;
+
+ case DEMANGLE_COMPONENT_TLS_WRAPPER:
+ d_append_string (dpi, "TLS wrapper function for ");
+ d_print_comp (dpi, options, d_left (dc));
+ return;
+
case DEMANGLE_COMPONENT_REFTEMP:
d_append_string (dpi, "reference temporary #");
d_print_comp (dpi, options, d_right (dc));
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index c9df186be0f..9323ff9f2e4 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -84,7 +84,7 @@ is respectively less than, matching, or greater than the array member.
@end deftypefn
-@c argv.c:142
+@c argv.c:135
@deftypefn Extension char** buildargv (char *@var{sp})
Given a pointer to a string, parse the string extracting fields
@@ -95,7 +95,7 @@ remains unchanged. The last element of the vector is followed by a
@code{NULL} element.
All of the memory for the pointer array and copies of the string
-is obtained from @code{malloc}. All of the memory can be returned to the
+is obtained from @code{xmalloc}. All of the memory can be returned to the
system with the single function call @code{freeargv}, which takes the
returned result of @code{buildargv}, as it's argument.
@@ -166,6 +166,14 @@ pointer encountered. Pointers to empty strings are ignored.
@end deftypefn
+@c argv.c:470
+@deftypefn Extension int countargv (char **@var{argv})
+
+Return the number of elements in @var{argv}.
+Returns zero if @var{argv} is NULL.
+
+@end deftypefn
+
@c crc32.c:141
@deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @
int @var{len}, unsigned int @var{init})
@@ -224,7 +232,7 @@ symbolic name or message.
@end deftypefn
-@c argv.c:361
+@c argv.c:341
@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
The @var{argcp} and @code{argvp} arguments are pointers to the usual
@@ -296,7 +304,24 @@ and backward slashes are equal.
@end deftypefn
-@c filename_cmp.c:81
+@c filename_cmp.c:178
+@deftypefn Extension int filename_eq (const void *@var{s1}, const void *@var{s2})
+
+Return non-zero if file names @var{s1} and @var{s2} are equivalent.
+This function is for use with hashtab.c hash tables.
+
+@end deftypefn
+
+@c filename_cmp.c:147
+@deftypefn Extension hashval_t filename_hash (const void *@var{s})
+
+Return the hash value for file name @var{s} that will be compared
+using filename_cmp.
+This function is for use with hashtab.c hash tables.
+
+@end deftypefn
+
+@c filename_cmp.c:89
@deftypefn Extension int filename_ncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n})
Return zero if the two file names @var{s1} and @var{s2} are equivalent
@@ -376,7 +401,7 @@ unchanged.
@end deftypefn
-@c argv.c:97
+@c argv.c:90
@deftypefn Extension void freeargv (char **@var{vector})
Free an argument vector that was built using @code{buildargv}. Simply
@@ -1465,6 +1490,13 @@ deallocate values.
@end deftypefn
+@c stack-limit.c:28
+@deftypefn Extension void stack_limit_increase (unsigned long @var{pref})
+
+Attempt to increase stack size limit to @var{pref} bytes if possible.
+
+@end deftypefn
+
@c stpcpy.c:23
@deftypefn Supplemental char* stpcpy (char *@var{dst}, const char *@var{src})
@@ -1574,6 +1606,16 @@ memory was available. The result is always NUL terminated.
@end deftypefn
+@c strnlen.c:6
+@deftypefn Supplemental size_t strnlen (const char *@var{s}, size_t @var{maxlen})
+
+Returns the length of @var{s}, as with @code{strlen}, but never looks
+past the first @var{maxlen} characters in the string. If there is no
+'\0' character in the first @var{maxlen} characters, returns
+@var{maxlen}.
+
+@end deftypefn
+
@c strrchr.c:6
@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
@@ -1728,6 +1770,22 @@ This function is especially useful when dealing with filename sorting,
because filenames frequently hold indices/version numbers.
@end deftypefun
+@c timeval-utils.c:43
+@deftypefn Extension void timeval_add (struct timeval *@var{a}, @
+ struct timeval *@var{b}, struct timeval *@var{result})
+
+Adds @var{a} to @var{b} and stores the result in @var{result}.
+
+@end deftypefn
+
+@c timeval-utils.c:67
+@deftypefn Extension void timeval_sub (struct timeval *@var{a}, @
+ struct timeval *@var{b}, struct timeval *@var{result})
+
+Subtracts @var{b} from @var{a} and stores the result in @var{result}.
+
+@end deftypefn
+
@c tmpnam.c:3
@deftypefn Supplemental char* tmpnam (char *@var{s})
@@ -1829,7 +1887,7 @@ does the return value. The third argument is unused in @libib{}.
@end deftypefn
-@c argv.c:306
+@c argv.c:286
@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file})
Write each member of ARGV, handling all necessary quoting, to the file
diff --git a/libiberty/maint-tool b/libiberty/maint-tool
index 36b92034f33..d50f8959a38 100644
--- a/libiberty/maint-tool
+++ b/libiberty/maint-tool
@@ -222,7 +222,7 @@ sub deps {
opendir(INC, $incdir);
while ($f = readdir INC) {
- next unless $f =~ /\.h$/;
+ next unless $f =~ /\.h$/ || $f =~ /\.def$/;
$mine{$f} = "\$(INCDIR)/$f";
$deps{$f} = join(' ', &deps_for("$incdir/$f"));
}
diff --git a/libiberty/objalloc.c b/libiberty/objalloc.c
index 3ddac2ce4cb..72e92d2ddce 100644
--- a/libiberty/objalloc.c
+++ b/libiberty/objalloc.c
@@ -1,5 +1,5 @@
/* objalloc.c -- routines to allocate memory for objects
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997-2012 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
@@ -112,8 +112,10 @@ objalloc_create (void)
/* Allocate space from an objalloc structure. */
PTR
-_objalloc_alloc (struct objalloc *o, unsigned long len)
+_objalloc_alloc (struct objalloc *o, unsigned long original_len)
{
+ unsigned long len = original_len;
+
/* We avoid confusion from zero sized objects by always allocating
at least 1 byte. */
if (len == 0)
@@ -121,6 +123,11 @@ _objalloc_alloc (struct objalloc *o, unsigned long len)
len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1);
+ /* Check for overflow in the alignment operation above and the
+ malloc argument below. */
+ if (len + CHUNK_HEADER_SIZE < original_len)
+ return NULL;
+
if (len <= o->current_space)
{
o->current_ptr += len;
diff --git a/libiberty/strnlen.c b/libiberty/strnlen.c
new file mode 100644
index 00000000000..4934973adca
--- /dev/null
+++ b/libiberty/strnlen.c
@@ -0,0 +1,30 @@
+/* Portable version of strnlen.
+ This function is in the public domain. */
+
+/*
+
+@deftypefn Supplemental size_t strnlen (const char *@var{s}, size_t @var{maxlen})
+
+Returns the length of @var{s}, as with @code{strlen}, but never looks
+past the first @var{maxlen} characters in the string. If there is no
+'\0' character in the first @var{maxlen} characters, returns
+@var{maxlen}.
+
+@end deftypefn
+
+*/
+
+#include "config.h"
+
+#include <stddef.h>
+
+size_t
+strnlen (const char *s, size_t maxlen)
+{
+ size_t i;
+
+ for (i = 0; i < maxlen; ++i)
+ if (s[i] == '\0')
+ break;
+ return i;
+}
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4fe082a615d..398ae6f16b1 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,42 @@
+2012-10-15 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * aarch64-opc.c (aarch64_sys_regs): Add rmr_el1, rmr_el2 and
+ rmr_el3; remove daifset and daifclr.
+
+2012-10-15 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * aarch64-opc.c (operand_general_constraint_met_p): Change to check
+ the alignment of addr.offset.imm instead of that of shifter.amount for
+ operand type AARCH64_OPND_ADDR_UIMM12.
+
+2012-10-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * arm-dis.c: Use preferred form of vrint instruction variants
+ for disassembly.
+
+2012-10-09 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
+
+ * i386-gen.c (cpu_flag_init): Add CPU_BDVER3_FLAGS.
+ * i386-init.h: Regenerated.
+
+2012-10-05 Peter Bergner <bergner@vnet.ibm.com>
+
+ * ppc-dis.c (ppc_opts) <altivec>: Use PPC_OPCODE_ALTIVEC2;
+ * ppc-opc.c (VBA): New define.
+ (powerpc_opcodes) <vcuxwfp, vcsxwfp, vcfpuxws, vcfpsxsw, vmr, vnot,
+ mfppr, mfppr32, mtppr, mtppr32>: New extended mnemonics.
+
+2012-10-04 Nick Clifton <nickc@redhat.com>
+
+ * v850-dis.c (disassemble): Place square parentheses around second
+ register operand of clr1, not1, set1 and tst1 instructions.
+
+2012-10-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * s390-mkopc.c: Support new option zEC12.
+ * s390-opc.c: Add new instruction formats.
+ * s390-opc.txt: Add new instructions for zEC12.
+
2012-09-27 Anthony Green <green@moxielogic.com>
* moxie-dis.c (print_insn_moxie): Print 'bad' instructions.
@@ -5,8 +44,8 @@
2012-09-25 Saravanan Ekanathan <saravanan.ekanathan@amd.com>
- * i386-gen.c (cpu_flag_init): Add missing Cpu flags in
- CPU_BDVER1_FLAGS, CPU_BDVER2_FLAGS, CPU_BTVER1_FLAGS
+ * i386-gen.c (cpu_flag_init): Add missing Cpu flags in
+ CPU_BDVER1_FLAGS, CPU_BDVER2_FLAGS, CPU_BTVER1_FLAGS
and CPU_BTVER2_FLAGS.
* i386-init.h: Regenerated.
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index 2d66a255e95..b5e0984f6c6 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -1426,7 +1426,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
0, 4095 * size);
return 0;
}
- if (!value_aligned_p (opnd->shifter.amount, size))
+ if (!value_aligned_p (opnd->addr.offset.imm, size))
{
set_unaligned_error (mismatch_detail, idx, size);
return 0;
@@ -2771,6 +2771,9 @@ const struct aarch64_name_value_pair aarch64_sys_regs [] =
{ "rvbar_el1", CPENC(3,0,C12,C0,1) }, /* RO */
{ "rvbar_el2", CPENC(3,4,C12,C0,1) }, /* RO */
{ "rvbar_el3", CPENC(3,6,C12,C0,1) }, /* RO */
+ { "rmr_el1", CPENC(3,0,C12,C0,2) },
+ { "rmr_el2", CPENC(3,4,C12,C0,2) },
+ { "rmr_el3", CPENC(3,6,C12,C0,2) },
{ "isr_el1", CPENC(3,0,C12,C1,0) }, /* RO */
{ "contextidr_el1", CPENC(3,0,C13,C0,1) },
{ "tpidr_el0", CPENC(3,3,C13,C0,2) },
@@ -2962,10 +2965,6 @@ const struct aarch64_name_value_pair aarch64_sys_regs [] =
{ "pmevtyper29_el0", CPENC(3,3,C14,C15,5) },
{ "pmevtyper30_el0", CPENC(3,3,C14,C15,6) },
{ "pmccfiltr_el0", CPENC(3,3,C14,C15,7) },
-
- { "daifset", CPENC(0,3,C4,C0,6) },
- { "daifclr", CPENC(0,3,C4,C0,7) },
-
{ 0, CPENC(0,0,0,0,0) },
};
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 22bdd829dc8..d140761e004 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -498,10 +498,10 @@ static const struct opcode32 coprocessor_opcodes[] =
{FPU_VFP_EXT_ARMV8, 0xfe800b40, 0xffb00f40, "vminnm%u.f64\t%z1, %z2, %z0"},
{FPU_VFP_EXT_ARMV8, 0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
{FPU_VFP_EXT_ARMV8, 0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
- {FPU_VFP_EXT_ARMV8, 0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32.f32\t%y1, %y0"},
- {FPU_VFP_EXT_ARMV8, 0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64.f64\t%z1, %z0"},
- {FPU_VFP_EXT_ARMV8, 0xfeb80a40, 0xffbc0f50, "vrint%16-17?mpna%u.f32.f32\t%y1, %y0"},
- {FPU_VFP_EXT_ARMV8, 0xfeb80b40, 0xffbc0f50, "vrint%16-17?mpna%u.f64.f64\t%z1, %z0"},
+ {FPU_VFP_EXT_ARMV8, 0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
+ {FPU_VFP_EXT_ARMV8, 0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
+ {FPU_VFP_EXT_ARMV8, 0xfeb80a40, 0xffbc0f50, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
+ {FPU_VFP_EXT_ARMV8, 0xfeb80b40, 0xffbc0f50, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
/* Generic coprocessor instructions. */
{ 0, SENTINEL_GENERIC_START, 0, "" },
@@ -584,7 +584,7 @@ static const struct opcode32 neon_opcodes[] =
{FPU_NEON_EXT_FMA, 0xf2200c10, 0xffa00f10, "vfms%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
/* Two registers, miscellaneous. */
- {FPU_NEON_EXT_ARMV8, 0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32.f32\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_ARMV8, 0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
{FPU_NEON_EXT_ARMV8, 0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
{FPU_CRYPTO_EXT_ARMV8, 0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
{FPU_CRYPTO_EXT_ARMV8, 0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index 87254d2df83..600904f1b84 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -92,6 +92,8 @@ static initializer cpu_flag_init[] =
"Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA4|CpuXOP|CpuLWP|CpuCX16|CpuClflush|CpuSSSE3|CpuSVME|CpuSSE4_1|CpuSSE4_2|CpuXsave|CpuAES|CpuAVX|CpuPCLMUL|CpuLZCNT|CpuPRFCHW" },
{ "CPU_BDVER2_FLAGS",
"Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA|CpuFMA4|CpuXOP|CpuLWP|CpuBMI|CpuTBM|CpuF16C|CpuCX16|CpuClflush|CpuSSSE3|CpuSVME|CpuSSE4_1|CpuSSE4_2|CpuXsave|CpuAES|CpuAVX|CpuPCLMUL|CpuLZCNT|CpuPRFCHW" },
+ { "CPU_BDVER3_FLAGS",
+ "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA|CpuFMA4|CpuXOP|CpuLWP|CpuBMI|CpuTBM|CpuF16C|CpuCX16|CpuClflush|CpuSSSE3|CpuSVME|CpuSSE4_1|CpuSSE4_2|CpuAES|CpuAVX|CpuPCLMUL|CpuLZCNT|CpuPRFCHW|CpuXsave|CpuXsaveopt" },
{ "CPU_BTVER1_FLAGS",
"Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4a|CpuABM|CpuLM|CpuPRFCHW|CpuCX16|CpuClflush|CpuFISTTP|CpuSVME|CpuLZCNT" },
{ "CPU_BTVER2_FLAGS",
diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h
index 4dbc18a1d61..2e4589b00ba 100644
--- a/opcodes/i386-init.h
+++ b/opcodes/i386-init.h
@@ -169,6 +169,12 @@
1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, \
0, 0, 0 } }
+#define CPU_BDVER3_FLAGS \
+ { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, \
+ 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, \
+ 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, \
+ 0, 0, 0 } }
+
#define CPU_BTVER1_FLAGS \
{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, \
0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 44310e879d4..03b31604876 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -88,7 +88,7 @@ struct ppc_mopt ppc_opts[] = {
| PPC_OPCODE_A2),
0 },
{ "altivec", (PPC_OPCODE_PPC),
- PPC_OPCODE_ALTIVEC },
+ PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 },
{ "any", 0,
PPC_OPCODE_ANY },
{ "booke", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE),
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 6ebcc90d660..cbf264b620a 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -156,6 +156,9 @@ const struct powerpc_operand powerpc_operands[] =
/* The BB field in an XL form instruction when it must be the same
as the BA field in the same instruction. */
#define BBA BB + 1
+ /* The VB field in a VX form instruction when it must be the same
+ as the VA field in the same instruction. */
+#define VBA BBA
{ 0x1f, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
/* The BD field in a B form instruction. The lower two bits are
@@ -3106,6 +3109,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"vmulesb", VX (4, 776), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"evlhhesplat", VX (4, 777), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, EVUIMM_2, RA}},
{"vcfux", VX (4, 778), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
+{"vcuxwfp", VX (4, 778), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
{"evlhhousplatx",VX(4, 780), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}},
{"vspltisb", VX (4, 780), VXVB_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, SIMM}},
{"evlhhousplat",VX (4, 781), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, EVUIMM_2, RA}},
@@ -3146,6 +3150,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"vcmpgtsh", VXR(4, 838,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vmulesh", VX (4, 840), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vcfsx", VX (4, 842), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
+{"vcsxwfp", VX (4, 842), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
{"vspltish", VX (4, 844), VXVB_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, SIMM}},
{"vupkhpx", VX (4, 846), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}},
{"mullhw", XRC(4, 424,0), X_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}},
@@ -3159,11 +3164,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"vsraw", VX (4, 900), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vcmpgtsw", VXR(4, 902,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vctuxs", VX (4, 906), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
+{"vcfpuxws", VX (4, 906), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
{"vspltisw", VX (4, 908), VXVB_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, SIMM}},
{"maclhwsu", XO (4, 460,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}},
{"maclhwsu.", XO (4, 460,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}},
{"vcmpbfp", VXR(4, 966,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vctsxs", VX (4, 970), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
+{"vcfpsxsw", VX (4, 970), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}},
{"vupklpx", VX (4, 974), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}},
{"maclhws", XO (4, 492,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}},
{"maclhws.", XO (4, 492,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}},
@@ -3234,6 +3241,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"vsubuwm", VX (4,1152), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vavguw", VX (4,1154), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vabsduw", VX (4,1155), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}},
+{"vmr", VX (4,1156), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VBA}},
{"vor", VX (4,1156), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"vcmpequw.", VXR(4, 134,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"udi2fcm.", APU(4, 579,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}},
@@ -3268,6 +3276,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"vavgsb", VX (4,1282), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"evmhessfaaw", VX (4,1283), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}},
{"evmhousiaaw", VX (4,1284), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}},
+{"vnot", VX (4,1284), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VBA}},
{"vnor", VX (4,1284), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
{"evmhossiaaw", VX (4,1285), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}},
{"udi4fcm.", APU(4, 643,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}},
@@ -4818,6 +4827,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"mfdvlim", XSPR(31,339,883), XSPR_MASK, TITAN, PPCNONE, {RT}},
{"mfclcsr", XSPR(31,339,884), XSPR_MASK, TITAN, PPCNONE, {RT}},
{"mfccr1", XSPR(31,339,888), XSPR_MASK, TITAN, PPCNONE, {RT}},
+{"mfppr", XSPR(31,339,896), XSPR_MASK, POWER7, PPCNONE, {RT}},
+{"mfppr32", XSPR(31,339,898), XSPR_MASK, POWER7, PPCNONE, {RT}},
{"mfrstcfg", XSPR(31,339,923), XSPR_MASK, TITAN, PPCNONE, {RT}},
{"mfdcdbtrl", XSPR(31,339,924), XSPR_MASK, TITAN, PPCNONE, {RT}},
{"mfdcdbtrh", XSPR(31,339,925), XSPR_MASK, TITAN, PPCNONE, {RT}},
@@ -5121,6 +5132,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"mtdvlim", XSPR(31,467,883), XSPR_MASK, TITAN, PPCNONE, {RS}},
{"mtclcsr", XSPR(31,467,884), XSPR_MASK, TITAN, PPCNONE, {RS}},
{"mtccr1", XSPR(31,467,888), XSPR_MASK, TITAN, PPCNONE, {RS}},
+{"mtppr", XSPR(31,467,896), XSPR_MASK, POWER7, PPCNONE, {RS}},
+{"mtppr32", XSPR(31,467,898), XSPR_MASK, POWER7, PPCNONE, {RS}},
{"mtummcr0", XSPR(31,467,936), XSPR_MASK, PPC750, PPCNONE, {RS}},
{"mtupmc1", XSPR(31,467,937), XSPR_MASK, PPC750, PPCNONE, {RS}},
{"mtupmc2", XSPR(31,467,938), XSPR_MASK, PPC750, PPCNONE, {RS}},
diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c
index b3f13ab5368..a1f0a1295c0 100644
--- a/opcodes/s390-mkopc.c
+++ b/opcodes/s390-mkopc.c
@@ -39,7 +39,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_Z9_109,
S390_OPCODE_Z9_EC,
S390_OPCODE_Z10,
- S390_OPCODE_Z196
+ S390_OPCODE_Z196,
+ S390_OPCODE_ZEC12
};
struct op_struct
@@ -365,6 +366,8 @@ main (void)
min_cpu = S390_OPCODE_Z10;
else if (strcmp (cpu_string, "z196") == 0)
min_cpu = S390_OPCODE_Z196;
+ else if (strcmp (cpu_string, "zEC12") == 0)
+ min_cpu = S390_OPCODE_ZEC12;
else {
fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string);
exit (1);
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 282298b98b6..f421abe0bee 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -171,50 +171,64 @@ const struct s390_operand s390_operands[] =
{ 8, 8, S390_OPERAND_SIGNED },
#define I8_32 48 /* 8 bit signed value starting at 32 */
{ 8, 32, S390_OPERAND_SIGNED },
-#define I16_16 49 /* 16 bit signed value starting at 16 */
+#define I12_12 49 /* 12 bit signed value starting at 12 */
+ { 12, 12, S390_OPERAND_SIGNED },
+#define I16_16 50 /* 16 bit signed value starting at 16 */
{ 16, 16, S390_OPERAND_SIGNED },
-#define I16_32 50 /* 16 bit signed value starting at 32 */
+#define I16_32 51 /* 16 bit signed value starting at 32 */
{ 16, 32, S390_OPERAND_SIGNED },
-#define I32_16 51 /* 32 bit signed value starting at 16 */
+#define I24_24 52 /* 24 bit signed value starting at 24 */
+ { 24, 24, S390_OPERAND_SIGNED },
+#define I32_16 53 /* 32 bit signed value starting at 16 */
{ 32, 16, S390_OPERAND_SIGNED },
/* Unsigned immediate operands. */
-#define U4_8 52 /* 4 bit unsigned value starting at 8 */
+#define U4_8 54 /* 4 bit unsigned value starting at 8 */
{ 4, 8, 0 },
-#define U4_12 53 /* 4 bit unsigned value starting at 12 */
+#define U4_12 55 /* 4 bit unsigned value starting at 12 */
{ 4, 12, 0 },
-#define U4_16 54 /* 4 bit unsigned value starting at 16 */
+#define U4_16 56 /* 4 bit unsigned value starting at 16 */
{ 4, 16, 0 },
-#define U4_20 55 /* 4 bit unsigned value starting at 20 */
+#define U4_20 57 /* 4 bit unsigned value starting at 20 */
{ 4, 20, 0 },
-#define U4_32 56 /* 4 bit unsigned value starting at 32 */
+#define U4_24 58 /* 4 bit unsigned value starting at 24 */
+ { 4, 24, 0 },
+#define U4_28 59 /* 4 bit unsigned value starting at 28 */
+ { 4, 28, 0 },
+#define U4_32 60 /* 4 bit unsigned value starting at 32 */
{ 4, 32, 0 },
-#define U8_8 57 /* 8 bit unsigned value starting at 8 */
+#define U4_36 61 /* 4 bit unsigned value starting at 36 */
+ { 4, 36, 0 },
+#define U8_8 62 /* 8 bit unsigned value starting at 8 */
{ 8, 8, 0 },
-#define U8_16 58 /* 8 bit unsigned value starting at 16 */
+#define U8_16 63 /* 8 bit unsigned value starting at 16 */
{ 8, 16, 0 },
-#define U8_24 59 /* 8 bit unsigned value starting at 24 */
+#define U8_24 64 /* 8 bit unsigned value starting at 24 */
{ 8, 24, 0 },
-#define U8_32 60 /* 8 bit unsigned value starting at 32 */
+#define U8_32 65 /* 8 bit unsigned value starting at 32 */
{ 8, 32, 0 },
-#define U16_16 61 /* 16 bit unsigned value starting at 16 */
+#define U16_16 66 /* 16 bit unsigned value starting at 16 */
{ 16, 16, 0 },
-#define U16_32 62 /* 16 bit unsigned value starting at 32 */
+#define U16_32 67 /* 16 bit unsigned value starting at 32 */
{ 16, 32, 0 },
-#define U32_16 63 /* 32 bit unsigned value starting at 16 */
+#define U32_16 68 /* 32 bit unsigned value starting at 16 */
{ 32, 16, 0 },
/* PC-relative address operands. */
-#define J16_16 64 /* PC relative jump offset at 16 */
+#define J12_12 69 /* PC relative offset at 12 */
+ { 12, 12, S390_OPERAND_PCREL },
+#define J16_16 70 /* PC relative offset at 16 */
{ 16, 16, S390_OPERAND_PCREL },
-#define J32_16 65 /* PC relative long offset at 16 */
+#define J16_32 71 /* PC relative offset at 16 */
+ { 16, 32, S390_OPERAND_PCREL },
+#define J32_16 72 /* PC relative offset at 16 */
{ 32, 16, S390_OPERAND_PCREL },
/* Conditional mask operands. */
-#define M_16OPT 66 /* 4 bit optional mask starting at 16 */
+#define M_16OPT 73 /* 4 bit optional mask starting at 16 */
{ 4, 16, S390_OPERAND_OPTIONAL },
};
@@ -240,13 +254,13 @@ const struct s390_operand s390_operands[] =
c - control register
d - displacement, 12 bit
f - floating pointer register
- fe - even numbered floating point register operand
+ fe - fpr extended operand, a valid floating pointer register pair
i - signed integer, 4, 8, 16 or 32 bit
l - length, 4 or 8 bit
p - pc relative
r - general purpose register
ro - optional register operand
- re - even numbered register operand
+ re - gpr extended operand, a valid general purpose register pair
u - unsigned integer, 4, 8, 16 or 32 bit
m - mode field, 4 bit
0 - operand skipped.
@@ -267,6 +281,8 @@ const struct s390_operand s390_operands[] =
The instruction format is: INSTR_SS_LLRDRD / MASK_SS_LLRDRD. */
#define INSTR_E 2, { 0,0,0,0,0,0 } /* e.g. pr */
+#define INSTR_IE_UU 4, { U4_24,U4_28,0,0,0,0 } /* e.g. niai */
+#define INSTR_MII_UPI 6, { U4_8,J12_12,I24_24 } /* e.g. bprp */
#define INSTR_RIE_RRP 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxhg */
#define INSTR_RIE_RRPU 6, { R_8,R_12,U4_32,J16_16,0,0 } /* e.g. crj */
#define INSTR_RIE_RRP0 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. crjne */
@@ -368,14 +384,16 @@ const struct s390_operand s390_operands[] =
#define INSTR_RSE_CCRD 6, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lmh */
#define INSTR_RSE_RURD 6, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icmh */
#define INSTR_RSL_R0RD 6, { D_20,L4_8,B_16,0,0,0 } /* e.g. tp */
+#define INSTR_RSL_LRDFU 6, { F_32,D_20,L4_8,B_16,U4_36,0 } /* e.g. cdzt */
+#define INSTR_RSL_LRDFEU 6, { FE_32,D_20,L4_8,B_16,U4_36,0 } /* e.g. cxzt */
#define INSTR_RSI_RRP 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */
#define INSTR_RSY_RRRD 6, { R_8,R_12,D20_20,B_16,0,0 } /* e.g. stmy */
#define INSTR_RSY_RERERD 6, { RE_8,RE_12,D20_20,B_16,0,0 } /* e.g. cdsy */
#define INSTR_RSY_RURD 6, { R_8,U4_12,D20_20,B_16,0,0 } /* e.g. icmh */
+#define INSTR_RSY_RURD2 6, { R_8,D20_20,B_16,U4_12,0,0 } /* e.g. loc */
+#define INSTR_RSY_R0RD 6, { R_8,D20_20,B_16,0,0,0 } /* e.g. locgt */
#define INSTR_RSY_AARD 6, { A_8,A_12,D20_20,B_16,0,0 } /* e.g. lamy */
-#define INSTR_RSY_CCRD 6, { C_8,C_12,D20_20,B_16,0,0 } /* e.g. lamy */
-#define INSTR_RSY_RDRM 6, { R_8,D20_20,B_16,U4_12,0,0 } /* e.g. loc */
-#define INSTR_RSY_RDR0 6, { R_8,D20_20,B_16,0,0,0 } /* e.g. loc */
+#define INSTR_RSY_CCRD 6, { C_8,C_12,D20_20,B_16,0,0 } /* e.g. stctg */
#define INSTR_RS_AARD 4, { A_8,A_12,D_20,B_16,0,0 } /* e.g. lam */
#define INSTR_RS_CCRD 4, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lctl */
#define INSTR_RS_R0RD 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sll */
@@ -407,6 +425,7 @@ const struct s390_operand s390_operands[] =
#define INSTR_SIY_IRD 6, { D20_20,B_16,I8_8,0,0,0 } /* e.g. asi */
#define INSTR_SIL_RDI 6, { D_20,B_16,I16_32,0,0,0 } /* e.g. chhsi */
#define INSTR_SIL_RDU 6, { D_20,B_16,U16_32,0,0,0 } /* e.g. clfhsi */
+#define INSTR_SMI_U0RDP 6, { U4_8,J16_32,D_20,B_16,0,0 } /* e.g. bpp */
#define INSTR_SSE_RDRD 6, { D_20,B_16,D_36,B_32,0,0 } /* e.g. mvsdk */
#define INSTR_SS_L0RDRD 6, { D_20,L8_8,B_16,D_36,B_32,0 } /* e.g. mvc */
#define INSTR_SS_L2RDRD 6, { D_20,B_16,D_36,L8_8,B_32,0 } /* e.g. pka */
@@ -422,6 +441,8 @@ const struct s390_operand s390_operands[] =
#define INSTR_S_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. lpsw */
#define MASK_E { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_IE_UU { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_MII_UPI { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIE_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RIE_RRPU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RIE_RRP0 { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
@@ -521,6 +542,8 @@ const struct s390_operand s390_operands[] =
#define MASK_RSE_CCRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
#define MASK_RSE_RURD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
#define MASK_RSL_R0RD { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
+#define MASK_RSL_LRDFU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSL_LRDFEU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSI_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RS_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RS_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -532,10 +555,10 @@ const struct s390_operand s390_operands[] =
#define MASK_RSY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_RERERD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSY_RURD2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSY_R0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
-#define MASK_RSY_RDRM { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
-#define MASK_RSY_RDR0 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
#define MASK_RXE_FRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
#define MASK_RXE_FERRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
#define MASK_RXE_RRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
@@ -560,6 +583,7 @@ const struct s390_operand s390_operands[] =
#define MASK_SIY_IRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_SIL_RDI { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SIL_RDU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SMI_U0RDP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SSE_RDRD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_L0RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_L2RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index 58b54d13135..5946a052668 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -1017,14 +1017,14 @@ b9f2 locr RRF_U0RR "load on condition 32 bit" z196 zarch
b9f200000000 locr*16 RRF_00RR "load on condition 32 bit" z196 zarch
b9e2 locgr RRF_U0RR "load on condition 64 bit" z196 zarch
b9e200000000 locgr*16 RRF_00RR "load on condition 64 bit" z196 zarch
-eb00000000f2 loc RSY_RDRM "load on condition 32 bit" z196 zarch
-eb00000000f2 loc*12 RSY_RDR0 "load on condition 32 bit" z196 zarch
-eb00000000e2 locg RSY_RDRM "load on condition 64 bit" z196 zarch
-eb00000000e2 locg*12 RSY_RDR0 "load on condition 64 bit" z196 zarch
-eb00000000f3 stoc RSY_RDRM "store on condition 32 bit" z196 zarch
-eb00000000f3 stoc*12 RSY_RDR0 "store on condition 32 bit" z196 zarch
-eb00000000e3 stocg RSY_RDRM "store on condition 64 bit" z196 zarch
-eb00000000e3 stocg*12 RSY_RDR0 "store on condition 64 bit" z196 zarch
+eb00000000f2 loc RSY_RURD2 "load on condition 32 bit" z196 zarch
+eb00000000f2 loc*12 RSY_R0RD "load on condition 32 bit" z196 zarch
+eb00000000e2 locg RSY_RURD2 "load on condition 64 bit" z196 zarch
+eb00000000e2 locg*12 RSY_R0RD "load on condition 64 bit" z196 zarch
+eb00000000f3 stoc RSY_RURD2 "store on condition 32 bit" z196 zarch
+eb00000000f3 stoc*12 RSY_R0RD "store on condition 32 bit" z196 zarch
+eb00000000e3 stocg RSY_RURD2 "store on condition 64 bit" z196 zarch
+eb00000000e3 stocg*12 RSY_R0RD "store on condition 64 bit" z196 zarch
b9f8 ark RRF_R0RR2 "add 3 operands 32 bit" z196 zarch
b9e8 agrk RRF_R0RR2 "add 3 operands 64 bit" z196 zarch
ec00000000d8 ahik RIE_RRI0 "add immediate 3 operands 32 bit" z196 zarch
@@ -1104,3 +1104,26 @@ b3d8 mxtra RRF_FEUFEFE2 "multiply extended dfp with rounding mode" z196 zarch
b3d3 sdtra RRF_FUFF2 "subtract long dfp with rounding mode" z196 zarch
b3db sxtra RRF_FEUFEFE2 "subtract extended dfp with rounding mode" z196 zarch
b2b8 srnmb S_RD "set 3 bit bfp rounding mode" z196 zarch
+b2ec etnd RRE_R0 "extract transaction nesting depth" zEC12 zarch
+e30000000025 ntstg RXY_RRRD "nontransactional store" zEC12 zarch
+b2fc tabort S_RD "transaction abort" zEC12 zarch
+e560 tbegin SIL_RDU "transaction begin" zEC12 zarch
+e561 tbeginc SIL_RDU "constrained transaction begin" zEC12 zarch
+b2f8 tend S_00 "transaction end" zEC12 zarch
+c7 bpp SMI_U0RDP "branch prediction preload" zEC12 zarch
+c5 bprp MII_UPI "branch prediction relative preload" zEC12 zarch
+b2fa niai IE_UU "next instruction access intent" zEC12 zarch
+e3000000009f lat RXY_RRRD "load and trap 32 bit" zEC12 zarch
+e30000000085 lgat RXY_RRRD "load and trap 64 bit" zEC12 zarch
+e300000000c8 lfhat RXY_RRRD "load high and trap" zEC12 zarch
+e3000000009d llgfat RXY_RRRD "load logical and trap 32>64" zEC12 zarch
+e3000000009c llgtat RXY_RRRD "load logical thirty one bits and trap 31>64" zEC12 zarch
+eb0000000023 clt RSY_RURD "compare logical and trap 32 bit reg-mem" zEC12 zarch
+eb0000000023 clt$12 RSY_R0RD "compare logical and trap 32 bit reg-mem" zEC12 zarch
+eb000000002b clgt RSY_RURD "compare logical and trap 64 bit reg-mem" zEC12 zarch
+eb000000002b clgt$12 RSY_R0RD "compare logical and trap 64 bit reg-mem" zEC12 zarch
+ec0000000059 risbgn RIE_RRUUU "rotate then insert selected bits nocc" zEC12 zarch
+ed00000000aa cdzt RSL_LRDFU "convert from zoned long" zEC12 zarch
+ed00000000ab cxzt RSL_LRDFEU "convert from zoned extended" zEC12 zarch
+ed00000000a8 czdt RSL_LRDFU "convert to zoned long" zEC12 zarch
+ed00000000a9 czxt RSL_LRDFEU "convert to zoned extended" zEC12 zarch
diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c
index 60b452bf79c..5f9d87b8f86 100644
--- a/opcodes/v850-dis.c
+++ b/opcodes/v850-dis.c
@@ -309,9 +309,11 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns
We may need to output a trailing ']' if the last operand
in an instruction is the register for a memory address.
- The exception (and there's always an exception) is the
+ The exception (and there's always an exception) are the
"jmp" insn which needs square brackets around it's only
- register argument. */
+ register argument, and the clr1/not1/set1/tst1 insns
+ which [...] around their second register argument. */
+
prefix = "";
if (operand->flags & V850_OPERAND_BANG)
{
@@ -334,6 +336,16 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns
info->fprintf_func (info->stream, "%s[", prefix);
square = TRUE;
}
+ else if (opnum == 2
+ && ( op->opcode == 0x00e407e0 /* clr1 */
+ || op->opcode == 0x00e207e0 /* not1 */
+ || op->opcode == 0x00e007e0 /* set1 */
+ || op->opcode == 0x00e607e0 /* tst1 */
+ ))
+ {
+ info->fprintf_func (info->stream, ", %s[", prefix);
+ square = TRUE;
+ }
else if (opnum > 1)
info->fprintf_func (info->stream, ", %s", prefix);
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 95e23dea9e4..4d5bde28da5 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-04 Chao-ying Fu <fu@mips.com>
+ Steve Ellcey <sellcey@mips.com>
+
+ * mips/mips3264r2.igen (rdhwr): New.
+
2012-09-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Always link against dv-sockser.o.
diff --git a/sim/mips/mips3264r2.igen b/sim/mips/mips3264r2.igen
index c52ec3b2c4f..e0b6d5bf640 100644
--- a/sim/mips/mips3264r2.igen
+++ b/sim/mips/mips3264r2.igen
@@ -241,6 +241,17 @@
}
+011111,00000,5.RT,5.RD,00000,111011::32::RDHWR
+"rdhwr r<RT>, r<RD>"
+*mips32r2:
+*mips64r2:
+{
+ // Return 0 for all hardware registers currently
+ GPR[RT] = EXTEND32 (0);
+ TRACE_ALU_RESULT1 (GPR[RT]);
+}
+
+
011111,00000,5.RT,5.RD,00010,100000::32::WSBH
"wsbh r<RD>, r<RT>"
*mips32r2: