summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authornobody <>2003-03-03 20:50:21 +0000
committernobody <>2003-03-03 20:50:21 +0000
commit900958cda09af0ca2839cc7e2a7c46355b051c83 (patch)
tree45e564da9eaed919ca56fc52f793cb0578b02a8b /gdb/testsuite
parentcddd45abf62af6ed70c8c67601a9f09da0a939b0 (diff)
downloadbinutils-gdb-900958cda09af0ca2839cc7e2a7c46355b051c83.tar.gz
This commit was manufactured by cvs2svn to create branchcagney_offbyone-20030303-branchpoint
'cagney_offbyone-20030303-branch'. Sprout from interps-20030202-branch 2003-02-02 23:00:07 UTC nobody 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2003-03-03 20:50:20 UTC Andrew Cagney <cagney@redhat.com> '2003-03-03 Andrew Cagney <cagney@redhat.com>': ChangeLog Makefile.def Makefile.in Makefile.tpl bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/bfd.c bfd/coff-h8300.c bfd/coff-ppc.c bfd/coffcode.h bfd/config.bfd bfd/cpu-arm.c bfd/doc/ChangeLog bfd/doc/bfd.texinfo bfd/doc/fdl.texi bfd/ecoff.c bfd/elf-bfd.h bfd/elf-eh-frame.c bfd/elf.c bfd/elf32-arm.h bfd/elf32-cris.c bfd/elf32-hppa.c bfd/elf32-i386.c bfd/elf32-m68k.c bfd/elf32-mips.c bfd/elf32-ppc.c bfd/elf32-ppc.h bfd/elf32-s390.c bfd/elf32-sh.c bfd/elf32-sparc.c bfd/elf32-vax.c bfd/elf64-alpha.c bfd/elf64-hppa.c bfd/elf64-mips.c bfd/elf64-mmix.c bfd/elf64-ppc.c bfd/elf64-ppc.h bfd/elf64-s390.c bfd/elf64-sparc.c bfd/elf64-x86-64.c bfd/elfcore.h bfd/elflink.c bfd/elflink.h bfd/elfn32-mips.c bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/format.c bfd/ieee.c bfd/libbfd.h bfd/libcoff.h bfd/mmo.c bfd/oasys.c bfd/po/da.po bfd/reloc.c bfd/section.c bfd/syms.c bfd/targets.c bfd/version.h config.guess config.sub configure configure.in gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/PROBLEMS gdb/TODO gdb/acinclude.m4 gdb/aclocal.m4 gdb/ada-exp.y gdb/ada-lang.c gdb/ada-lang.h gdb/ada-typeprint.c gdb/alpha-tdep.c gdb/arch-utils.c gdb/arm-linux-tdep.c gdb/arm-tdep.c gdb/avr-tdep.c gdb/ax-gdb.c gdb/block.c gdb/block.h gdb/blockframe.c gdb/breakpoint.c gdb/breakpoint.h gdb/buildsym.c gdb/buildsym.h gdb/c-exp.y gdb/c-valprint.c gdb/cli-out.c gdb/cli-out.h gdb/cli/cli-cmds.c gdb/cli/cli-decode.c gdb/cli/cli-dump.c gdb/cli/cli-interp.c gdb/cli/cli-script.c gdb/cli/cli-setshow.c gdb/coff-pe-read.c gdb/coff-pe-read.h gdb/coffread.c gdb/config.in gdb/config/djgpp/fnchange.lst gdb/config/h8500/h8500.mt gdb/config/h8500/tm-h8500.h gdb/config/i386/nm-i386.h gdb/config/i386/nm-i386sco5.h gdb/config/i386/nm-i386sol2.h gdb/config/i386/tm-ptx.h gdb/config/ia64/tm-ia64.h gdb/config/m32r/m32r.mt gdb/config/m32r/tm-m32r.h gdb/config/mn10200/mn10200.mt gdb/config/mn10200/tm-mn10200.h gdb/config/pa/tm-hppa.h gdb/config/pa/tm-hppa64.h gdb/config/s390/nm-linux.h gdb/config/sparc/nm-sun4sol2.h gdb/config/sparc/tm-sp64.h gdb/config/sparc/tm-sparc.h gdb/config/z8k/tm-z8k.h gdb/config/z8k/z8k.mt gdb/configure gdb/configure.host gdb/configure.in gdb/configure.tgt gdb/cp-valprint.c gdb/cris-tdep.c gdb/d10v-tdep.c gdb/dbxread.c gdb/defs.h gdb/disasm.c gdb/doc/ChangeLog gdb/doc/Makefile.in gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/doublest.c gdb/dwarf2cfi.c gdb/dwarf2expr.c gdb/dwarf2expr.h gdb/dwarf2loc.c gdb/dwarf2loc.h gdb/dwarf2read.c gdb/dwarfread.c gdb/elfread.c gdb/event-top.c gdb/event-top.h gdb/expprint.c gdb/f-exp.y gdb/f-lang.c gdb/f-valprint.c gdb/findvar.c gdb/frame.c gdb/frame.h gdb/frv-tdep.c gdb/gdb.c gdb/gdb_mbuild.sh gdb/gdb_thread_db.h gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbtypes.c gdb/gdbtypes.h gdb/gnu-v2-abi.c gdb/h8300-tdep.c gdb/h8500-tdep.c gdb/hppa-tdep.c gdb/hpread.c gdb/hpux-thread.c gdb/i386-interix-tdep.c gdb/i386-linux-tdep.c gdb/i386-tdep.c gdb/i386bsd-tdep.c gdb/ia64-linux-nat.c gdb/ia64-tdep.c gdb/infcmd.c gdb/inflow.c gdb/inflow.h gdb/infptrace.c gdb/infrun.c gdb/inftarg.c gdb/infttrace.c gdb/interps.c gdb/interps.h gdb/jv-exp.y gdb/jv-lang.c gdb/jv-typeprint.c gdb/jv-valprint.c gdb/linespec.c gdb/linux-proc.c gdb/lynx-nat.c gdb/m2-exp.y gdb/m32r-rom.c gdb/m32r-stub.c gdb/m32r-tdep.c gdb/m68hc11-tdep.c gdb/m68k-tdep.c gdb/main.c gdb/main.h gdb/maint.c gdb/mcore-tdep.c gdb/mdebugread.c gdb/mi/ChangeLog gdb/mi/gdbmi.texinfo gdb/mi/mi-cmd-env.c gdb/mi/mi-cmd-stack.c gdb/mi/mi-cmds.c gdb/mi/mi-cmds.h gdb/mi/mi-console.c gdb/mi/mi-console.h gdb/mi/mi-interp.c gdb/mi/mi-main.c gdb/mi/mi-main.h gdb/minsyms.c gdb/mips-tdep.c gdb/mipsread.c gdb/mn10200-tdep.c gdb/mn10300-tdep.c gdb/monitor.c gdb/nlmread.c gdb/ns32k-tdep.c gdb/objc-exp.y gdb/objc-lang.c gdb/objc-lang.h gdb/objfiles.c gdb/objfiles.h gdb/observer.c gdb/observer.h gdb/osabi.c gdb/p-exp.y gdb/p-valprint.c gdb/parse.c gdb/parser-defs.h gdb/ppc-linux-nat.c gdb/ppc-linux-tdep.c gdb/printcmd.c gdb/proc-api.c gdb/procfs.c gdb/rdi-share/ardi.c gdb/regcache.c gdb/regcache.h gdb/remote-e7000.c gdb/remote-sim.c gdb/remote.c gdb/rs6000-tdep.c gdb/s390-tdep.c gdb/sh-tdep.c gdb/sol-thread.c gdb/solib-sunos.c gdb/solib.c gdb/solist.h gdb/somread.c gdb/somsolib.c gdb/sparc-nat.c gdb/sparc-tdep.c gdb/stabsread.c gdb/stack.c gdb/symfile.c gdb/symfile.h gdb/symm-nat.c gdb/symmisc.c gdb/symtab.c gdb/symtab.h gdb/target.c gdb/target.h gdb/testsuite/ChangeLog gdb/testsuite/Makefile.in gdb/testsuite/configure.in gdb/testsuite/gdb.base/advance.c gdb/testsuite/gdb.base/advance.exp gdb/testsuite/gdb.base/dump.exp gdb/testsuite/gdb.base/exprs.exp gdb/testsuite/gdb.base/funcargs.exp gdb/testsuite/gdb.base/list.exp gdb/testsuite/gdb.base/maint.exp gdb/testsuite/gdb.base/ptype.exp gdb/testsuite/gdb.base/restore.c gdb/testsuite/gdb.base/until.exp gdb/testsuite/gdb.base/watchpoint.exp gdb/testsuite/gdb.c++/anon-union.exp gdb/testsuite/gdb.c++/classes.exp gdb/testsuite/gdb.c++/cplusfuncs.exp gdb/testsuite/gdb.c++/inherit.exp gdb/testsuite/gdb.c++/local.cc gdb/testsuite/gdb.c++/local.exp gdb/testsuite/gdb.c++/overload.cc gdb/testsuite/gdb.c++/overload.exp gdb/testsuite/gdb.c++/ovldbreak.exp gdb/testsuite/gdb.c++/pr-1023.cc gdb/testsuite/gdb.c++/pr-1023.exp gdb/testsuite/gdb.c++/templates.exp gdb/testsuite/gdb.c++/virtfunc.exp gdb/testsuite/gdb.disasm/Makefile.in gdb/testsuite/gdb.disasm/mn10200.exp gdb/testsuite/gdb.mi/ChangeLog gdb/testsuite/gdb.mi/mi-cli.exp gdb/testsuite/gdb.mi/mi-syn-frame.c gdb/testsuite/gdb.mi/mi-syn-frame.exp gdb/testsuite/gdb.trace/Makefile.in gdb/testsuite/lib/gdb.exp gdb/thread.c gdb/top.c gdb/tracepoint.c gdb/tui/ChangeLog gdb/tui/tui-hooks.c gdb/tui/tui-interp.c gdb/tui/tui.c gdb/tui/tuiData.h gdb/tui/tuiIO.c gdb/typeprint.c gdb/ui-out.c gdb/ui-out.h gdb/utils.c gdb/v850-tdep.c gdb/valops.c gdb/value.h gdb/values.c gdb/vax-tdep.c gdb/version.in gdb/win32-nat.c gdb/wrapper.h gdb/x86-64-linux-nat.c gdb/x86-64-tdep.c gdb/xcoffread.c gdb/xstormy16-tdep.c gdb/z8k-tdep.c include/ChangeLog include/elf/ChangeLog include/elf/arm.h include/elf/ia64.h include/elf/ppc.h include/elf/ppc64.h include/gdb/ChangeLog include/gdb/remote-sim.h include/libiberty.h include/opcode/ChangeLog include/opcode/h8300.h libiberty/ChangeLog libiberty/Makefile.in libiberty/acconfig.h libiberty/aclocal.m4 libiberty/config.in libiberty/configure libiberty/configure.in libiberty/cplus-dem.c libiberty/functions.texi libiberty/libiberty.texi libiberty/lrealpath.c libiberty/make-relative-prefix.c libiberty/physmem.c libtool.m4 ltcf-cxx.sh ltcf-gcj.sh ltconfig opcodes/ChangeLog opcodes/fr30-desc.c opcodes/hppa-dis.c opcodes/i386-dis.c opcodes/mips-dis.c readline/ChangeLog.gdb readline/Makefile.in readline/aclocal.m4 readline/config.h.in readline/configure readline/rlmbutil.h readline/shlib/Makefile.in sim/ChangeLog sim/arm/ChangeLog sim/arm/armos.c sim/arm/wrapper.c sim/common/ChangeLog sim/common/Make-common.in sim/common/nrun.c sim/common/sim-base.h sim/common/sim-engine.c sim/common/sim-engine.h sim/common/sim-hload.c sim/common/sim-module.c sim/common/sim-utils.h sim/d10v/ChangeLog sim/d10v/interp.c sim/erc32/ChangeLog sim/erc32/interf.c sim/h8300/ChangeLog sim/h8300/compile.c sim/h8500/ChangeLog sim/h8500/compile.c sim/i960/ChangeLog sim/i960/sim-if.c sim/m32r/ChangeLog sim/m32r/sim-if.c sim/m68hc11/ChangeLog sim/m68hc11/Makefile.in sim/m68hc11/interp.c sim/mcore/ChangeLog sim/mcore/interp.c sim/mips/ChangeLog sim/mips/interp.c sim/mn10200/ChangeLog sim/mn10200/interp.c sim/mn10300/ChangeLog sim/mn10300/am33.igen sim/mn10300/dv-mn103tim.c sim/mn10300/interp.c sim/ppc/ChangeLog sim/ppc/sim_calls.c sim/sh/ChangeLog sim/sh/gencode.c sim/sh/interp.c sim/v850/ChangeLog sim/v850/interp.c sim/z8k/ChangeLog sim/z8k/iface.c Delete: gdb/config/i386/gdbserve.mt gdb/config/i386/i386sco5.mt gdb/config/i386/i386v4.mt gdb/config/i386/i386v42mp.mt gdb/config/m68k/nm-apollo68b.h gdb/config/m68k/nm-hp300bsd.h gdb/config/m68k/tm-apollo68b.h gdb/config/m68k/tm-es1800.h gdb/config/m68k/tm-hp300bsd.h gdb/config/m68k/tm-mac.h gdb/config/m68k/xm-apollo68b.h gdb/config/pa/hpux1020.mt gdb/config/pa/hpux11.mt gdb/config/pa/hpux11w.mt gdb/config/powerpc/gdbserve.mt gdb/config/powerpc/ppcle-eabi.mt gdb/config/powerpc/ppcle-sim.mt gdb/config/powerpc/tm-ppc-sim.h gdb/config/sparc/sp64sim.mt gdb/config/sparc/tm-sp64sim.h sim/common/sim-break.c sim/common/sim-break.h
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog160
-rw-r--r--gdb/testsuite/Makefile.in2
-rw-r--r--gdb/testsuite/configure.in2
-rw-r--r--gdb/testsuite/gdb.base/advance.c5
-rw-r--r--gdb/testsuite/gdb.base/advance.exp6
-rw-r--r--gdb/testsuite/gdb.base/dump.exp1
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp10
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp7
-rw-r--r--gdb/testsuite/gdb.base/list.exp6
-rw-r--r--gdb/testsuite/gdb.base/maint.exp2
-rw-r--r--gdb/testsuite/gdb.base/ptype.exp3
-rw-r--r--gdb/testsuite/gdb.base/restore.c1
-rw-r--r--gdb/testsuite/gdb.base/until.exp2
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp2
-rw-r--r--gdb/testsuite/gdb.c++/anon-union.exp5
-rw-r--r--gdb/testsuite/gdb.c++/classes.exp109
-rw-r--r--gdb/testsuite/gdb.c++/cplusfuncs.exp13
-rw-r--r--gdb/testsuite/gdb.c++/inherit.exp62
-rw-r--r--gdb/testsuite/gdb.c++/local.cc7
-rw-r--r--gdb/testsuite/gdb.c++/local.exp35
-rw-r--r--gdb/testsuite/gdb.c++/overload.cc7
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp2
-rw-r--r--gdb/testsuite/gdb.c++/ovldbreak.exp37
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.cc20
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.exp79
-rw-r--r--gdb/testsuite/gdb.c++/templates.exp133
-rw-r--r--gdb/testsuite/gdb.c++/virtfunc.exp18
-rw-r--r--gdb/testsuite/gdb.disasm/Makefile.in2
-rw-r--r--gdb/testsuite/gdb.disasm/mn10200.exp956
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp208
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.c9
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.exp7
-rw-r--r--gdb/testsuite/gdb.trace/Makefile.in2
-rw-r--r--gdb/testsuite/lib/gdb.exp9
35 files changed, 1207 insertions, 726 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 82f3843f3ed..14b54f4c376 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,161 @@
+2003-03-03 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/classes.exp (test_enums): KFAIL "ptype obj_with_enum"
+ with respect to PR c++/57.
+ KFAIL "print (ClassWithEnum::PrivEnum) 42" with respect to PR
+ c++/826.
+ Create "print ('ClassWithEnum::PrivEnum') 42"; KFAIL it with
+ respect to PR c++/57.
+
+2003-03-03 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/templates.exp (do_tests): Convert the KFAILs with
+ respect to PR c++/33 into FAILs.
+
+2003-03-03 Michael Chastain <mec@shout.net>
+
+ * configure.in: Update copyright years.
+
+2003-03-03 Michael Chastain <mec@shout.net>
+
+ * Makefile.in: Update copyright years.
+
+2003-02-28 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/classes.exp (test_ptype_class_objects): Accept it if we
+ print class instead of struct and/or superfluous protection
+ specifiers, as long as the resulting output is equivalent to the
+ source code.
+ Delete FIXME from end of messages on tests that don't need
+ fixing.
+
+2003-02-28 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/templates.exp (do_tests): Allow const in the two
+ Foo<volatile char *>::foo tests.
+
+2003-02-27 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/restore.c (main): Return zero, so exit code
+ will be consistant.
+
+2003-02-26 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/templates.exp (do_tests): KFAIL the "print Foo<volatile
+ char *>::foo" test with respect to PR c++/33. Create a new test
+ which is identical to that one except that it doesn't put the
+ space between the "char" and the "*"; KFAIL it, too.
+
+2003-02-26 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/templates.exp (do_tests): Convert XFAILs about printing
+ template types into either PASSes or KFAILs (corresponding to PR
+ c++/57). Tweak indentation. Update copyright.
+
+2003-02-23 Stephane Carrez <stcarrez@nerim.fr>
+
+ * lib/gdb.exp: Don't execute C++ tests on m6811/m6812 targets.
+
+2003-02-13 Michael Chastain <mec@shout.net>
+
+ * gdb.base/exprs.exp: Remove i960 remnants.
+ * gdb.base/funcargs.exp: Likewise.
+ * gdb.base/list.exp: Likewise.
+ * gdb.base/ptype.exp: Likewise.
+
+2003-02-14 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/virtfunc.exp (test_virtual_calls): Change 'print
+ pEe->D::vg()" from XFAIL to KFAIL.
+
+2003-02-13 Jason Molenda (jmolenda@apple.com)
+
+ * gdb.base/maint.exp: Update maint print statistics regexp to include
+ new entries.
+
+2003-02-13 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/inherit.exp: Remove call to get_debug_format.
+
+2003-02-12 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/classes.exp: Remove setup_xfail_format for DWARF 1.
+ * gdb.c++/inherit.exp: Likewise.
+ * gdb.c++/cplusfuncs.exp: Remove suppression logic for DWARF 1.
+ * gdb.c++/templates.exp: Likewise.
+ * gdb.c++/virtfunc.exp: Likewise.
+
+2003-02-06 Jason Molenda (jason-cl@molenda.com)
+
+ * gdb.mi/mi-syn-frame.c (subroutine): Add a comment explaining
+ why the code is written that way.
+
+2003-02-05 Michael Chastain <mec@shout.net>
+
+ * gdb.base/dump.exp: Add missing copyright line.
+
+2003-02-05 Jason Molenda (jason-cl@molenda.com)
+
+ * gdb.mi/mi-syn-frame.c (subroutine): Add an extra statement
+ at the beginning so the breakpoint doesn't get set on the loop.
+
+2003-02-05 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/local.exp: Relax the test for PR gdb/825 to accept
+ output for configurations with gcc 2.95.3.
+
+2003-02-05 Keith Seitz <keiths@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.mi/mi-cli.exp: New file.
+
+2003-02-04 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/anon-union.exp: Do not call gdb_suppress_entire_file.
+ Call perror and then continue.
+
+2003-02-03 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/pr-1023.cc: New file.
+ * gdb.c++/pr-1023.exp: New file.
+
+2003-02-05 Jim Blandy <jimb@redhat.com>
+
+ * gdb.c++/local.exp: Don't expect Local to be in scope in main;
+ it's local to foobar. Check for it there, and check that it's not
+ present in main.
+ * gdb.c++/local.cc (marker2): New function.
+ (foobar): Call marker1.
+ (main): Call marker2 instead of marker1.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.disasm/mn10200.exp: Obsolete file.
+ * gdb.trace/Makefile.in (clean mostlyclean): Remove mn10200.
+ * gdb.disasm/Makefile.in (clean mostlyclean): Remove mn10200.
+ * gdb.base/watchpoint.exp: Mark the mn10200 xfails as obsolete.
+
+2003-02-04 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/overload.exp: Test intToChar(1).
+ * gdb.c++/overload.cc (intToChar): New.
+ (main): Call intToChar.
+
+2003-02-03 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/ovldbreak.exp (continue_to_bp_overloaded): Add
+ 'might_kfail' arg.
+ KFAIL some of the continue_to_bp_overloaded calls, according to
+ PR c++/1025.
+
+2003-02-01 Michael Chastain <mec@shout.net>
+
+ * gdb.base/advance.c (marker1): New marker function.
+ * gdb.base/advance.exp: When the 'advance' command lands on the
+ return breakpoint, it can legitimately stop on either the
+ current line or the next line. Accommodate both outcomes.
+ * gdb.base/until.exp: Likewise.
+
2003-02-02 Andrew Cagney <ac131313@redhat.com>
2002-11-10 Jason Molenda (jason-cl@molenda.com):
@@ -36,6 +194,8 @@
2003-01-29 Michael Snyder <msnyder@redhat.com>
+ * gdb.base/maint.exp: Allow for leading underscore in symbol.
+ * gdb.base/display.exp: Allow for leading underscore in symbol.
* gdb.base/args.exp: Skip if target does not support args passing.
2003-01-22 Daniel Jacobowitz <drow@mvista.com>
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 29079d4b84f..c0ba9ab79c2 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for regression testing the GNU debugger.
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# This file is part of GDB.
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index 70bbee2fe7e..8ba930f1600 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-# Copyright (C) 2002
+# Copyright 2002, 2003
# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c
index 2ae3cc50c4a..8066deec421 100644
--- a/gdb/testsuite/gdb.base/advance.c
+++ b/gdb/testsuite/gdb.base/advance.c
@@ -29,6 +29,10 @@ int func3 ()
x = 4;
}
+void marker1 ()
+{
+}
+
int
main ()
{
@@ -38,6 +42,7 @@ main ()
b = 3; /* advance this location */
func (c); /* stop here after leaving current frame */
+ marker1 (); /* stop here after leaving current frame */
func3 (); /* break here */
result = bar (b + foo (c));
return 0; /* advance malformed */
diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp
index aea5a6d57fc..e5061d8fbf6 100644
--- a/gdb/testsuite/gdb.base/advance.exp
+++ b/gdb/testsuite/gdb.base/advance.exp
@@ -63,8 +63,12 @@ gdb_test "advance func" \
# Verify that "advance <funcname>" when funcname is NOT called by the current
# frame, stops at the end of the current frame.
#
+# gdb can legitimately stop on either the current line or the next line,
+# depending on whether the machine instruction for 'call' on the current
+# line has more instructions after it or not.
+#
gdb_test "advance func3" \
- "in main.*func \\(c\\).*stop here after leaving current frame..."\
+ "(in main|).*(func \\(c\\)|marker1 \\(\\)).*stop here after leaving current frame..."\
"advance function not called by current frame"
# break at main again
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 826fdfb0bfd..5885307cea7 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -1,3 +1,4 @@
+# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 49df15a2f60..f6ce7194a8c 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -1,5 +1,5 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000,
+# 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -98,13 +98,7 @@ test_expr "set variable v_unsigned_char=127" "print v_unsigned_char != 0" "\\$\[
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char < 0" "\\$\[0-9\]* = $false" "print v_unsigned_char < 127" "\\$\[0-9\]* = $false" "print unsigned char <"
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char > 0" "\\$\[0-9\]* = $true" "print v_unsigned_char > 127" "\\$\[0-9\]* = $false" "print unsigned char >"
# make char a minus
-# FIXME: gdb mishandles the cast (unsigned char) on the i960, so I've
-# set up an expected failure for this case.
-setup_xfail "i960-*-*" 1821
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char == 0" "\\$\[0-9\]* = $false" "print v_unsigned_char == ~0" "\\$\[0-9\]* = $false" "print v_unsigned_char == (unsigned char)~0" "\\$\[0-9\]* = $true" "print unsigned char == (~0)"
-# FIXME: gdb mishandles the cast (unsigned char) on the i960, so I've
-# set up an expected failure for this case.
-setup_xfail "i960-*-*" 1821
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char != 0" "\\$\[0-9\]* = $true" "print v_unsigned_char != (unsigned char)~0" "\\$\[0-9\]* = $false" "print v_unsigned_char != ~0" "\\$\[0-9\]* = $true" "print unsigned char != (~0)"
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char < 0" "\\$\[0-9\]* = $false" "print v_unsigned_char < 127" "\\$\[0-9\]* = $false" "print unsigned char < (~0)"
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char > 0" "\\$\[0-9\]* = $true" "print v_unsigned_char > 127" "\\$\[0-9\]* = $true" "print unsigned char > (~0)"
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 2ed154a007b..38949f1599c 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -177,7 +177,6 @@ proc float_and_integral_args {} {
# Run; should stop at call2a and print actual arguments.
- setup_xfail "i960-*-*" 1813
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
# The debug info. for "f" is not correct. It's a known bug.
if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
@@ -680,9 +679,6 @@ $gdb_prompt $" {
# Continue; should stop at call6k and print actual arguments.
# Print backtrace.
- # This fails on i960-*-vxworks because gdb gets confused by
- # breakpoints on adjacent instructions.
- setup_xfail "i960-*-vxworks" 1786
gdb_continue call6k
if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
@@ -742,7 +738,6 @@ proc shuffle_round_robin {} {
timeout { fail "(timeout) run to call7a" ; gdb_suppress_tests; }
}
- setup_xfail "i960-*-*" 1813
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
# The debug info. for "f" is not correct. It's a known bug.
if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index 881e0e6bff9..dee91520e92 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2002
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -405,8 +405,6 @@ proc test_list_filename_and_function {} {
timeout { fail "list list0.c:main (timeout)" }
}
- # The i960 is a second case
-
# Not sure what the point of having this function be unused is.
# AIX is legitimately removing it.
setup_xfail "rs6000-*-aix*"
@@ -465,8 +463,6 @@ proc test_list_filename_and_function {} {
timeout { fail "list list1.c:bar (timeout)" }
}
- # The i960 is a second case
-
# Not sure what the point of having this function be unused is.
# AIX is legitimately removing it.
setup_xfail "rs6000-*-aix*"
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 69fecaddf17..d8286508699 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -180,7 +180,7 @@ gdb_expect {
send_gdb "maint print statistics\n"
gdb_expect {
- -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\
+ -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\
{ pass "maint print statistics" }
-re ".*$gdb_prompt $" { fail "maint print statistics" }
timeout { fail "(timeout) maint print statistics" }
diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp
index 8ef738e28ab..6e33d854805 100644
--- a/gdb/testsuite/gdb.base/ptype.exp
+++ b/gdb/testsuite/gdb.base/ptype.exp
@@ -172,7 +172,6 @@ gdb_test "ptype red" "type = enum \{red, green, blue\}.*" "ptype unnamed enumera
# acts like whatis for basic types. If it is thought to be necessary to
# test both whatis and ptype for all the types, the tests should be
# merged into whatis.exp, or else maintenance will be a royal pain -kingdon
-#setup_xfail "i960-*-*" 1821
#setup_xfail "mips-idt-*" "mips-sgi-*"
#send "ptype v_char\n"
#gdb_expect {
@@ -277,7 +276,6 @@ gdb_test "ptype v_int" "type = int.*" "ptype int"
#
# test ptype command with arrays
#
-#setup_xfail "i960-*-*" 1821
#setup_xfail "mips-idt-*" "mips-sgi-*"
#send "ptype v_char_array\n"
#gdb_expect {
@@ -380,7 +378,6 @@ gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
##
## test ptype command with pointers
##
-#setup_xfail "i960-*-*" 1821
#setup_xfail "mips-idt-*" "mips-sgi-*"
#send "ptype v_char_pointer\n"
#gdb_expect {
diff --git a/gdb/testsuite/gdb.base/restore.c b/gdb/testsuite/gdb.base/restore.c
index e05d68c2145..a8282eee2c0 100644
--- a/gdb/testsuite/gdb.base/restore.c
+++ b/gdb/testsuite/gdb.base/restore.c
@@ -257,4 +257,5 @@ int main ()
#endif
driver ();
printf("exiting\n");
+ return 0;
}
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
index 815933279c9..f646c6d36ae 100644
--- a/gdb/testsuite/gdb.base/until.exp
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -76,6 +76,6 @@ delete_breakpoints
# stop at main, the caller, where we put the 'guard' breakpoint.
#
gdb_test "until marker3" \
- "$hex in main.*argc.*argv.*envp.*at.*${srcfile}:82.*marker2 \\(43\\)." \
+ "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:(82.*marker2 \\(43\\)|83.*marker3 \\(.stack., .trace.\\))." \
"until func, not called by current frame"
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index e150d555e60..f10955fce5a 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -394,7 +394,7 @@ proc test_stepping {} {
clear_xfail "sparc-*-*"
clear_xfail "hppa*-*-*bsd*"
# It works with the generic inferior function calling code too.
- clear_xfail "mn10200*-*-*"
+ # OBSOLETE clear_xfail "mn10200*-*-*"
clear_xfail "mn10300*-*-*"
# The following architectures define CALL_DUMMY_HAS_COMPLETED.
clear_xfail "hppa*-*-*hpux*"
diff --git a/gdb/testsuite/gdb.c++/anon-union.exp b/gdb/testsuite/gdb.c++/anon-union.exp
index 9b86b5d94ab..0d5c7777319 100644
--- a/gdb/testsuite/gdb.c++/anon-union.exp
+++ b/gdb/testsuite/gdb.c++/anon-union.exp
@@ -1,5 +1,5 @@
# Tests for anonymous union support.
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,7 +40,8 @@ set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ perror "Testcase compile failed" 0
+ continue
}
# Start with a fresh gdb
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp
index dbdea5d69c6..3f398acc5ec 100644
--- a/gdb/testsuite/gdb.c++/classes.exp
+++ b/gdb/testsuite/gdb.c++/classes.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ proc test_ptype_class_objects {} {
# Note that struct members are public by default, so we don't print
# "public:" for the public members of structs.
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
send_gdb "ptype struct default_public_struct\n"
@@ -64,8 +64,7 @@ proc test_ptype_class_objects {} {
pass "ptype struct default_public_struct"
}
-re "type = class default_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype struct default_public_struct"
+ pass "ptype struct default_public_struct"
}
-re ".*$gdb_prompt $" { fail "ptype struct default_public_struct" }
timeout { fail "ptype struct default_public_struct (timeout)" ; return }
@@ -73,7 +72,7 @@ proc test_ptype_class_objects {} {
# Note that struct members are public by default, so we don't print
# "public:" for the public members of structs.
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
send_gdb "ptype struct explicit_public_struct\n"
@@ -82,78 +81,70 @@ proc test_ptype_class_objects {} {
pass "ptype struct explicit_public_struct"
}
-re "type = class explicit_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype struct explicit_public_struct"
+ pass "ptype struct explicit_public_struct"
}
-re ".*$gdb_prompt $" { fail "ptype struct explicit_public_struct" }
timeout { fail "ptype struct explicit_public_struct (timeout)" ; return }
}
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
- setup_xfail_format "DWARF 1"
send_gdb "ptype struct protected_struct\n"
gdb_expect {
-re "type = struct protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct protected_struct (FIXME)"
+ pass "ptype struct protected_struct"
}
-re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype struct protected_struct (FIXME)"
+ pass "ptype struct protected_struct"
}
-re ".*$gdb_prompt $" { fail "ptype struct protected_struct" }
timeout { fail "ptype struct protected_struct (timeout)" ; return }
}
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
- setup_xfail_format "DWARF 1"
send_gdb "ptype struct private_struct\n"
gdb_expect {
-re "type = struct private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct private_struct (FIXME)"
+ pass "ptype struct private_struct"
}
-re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype struct private_struct (FIXME)"
+ pass "ptype struct private_struct"
}
-re ".*$gdb_prompt $" { fail "ptype struct private_struct" }
timeout { fail "ptype struct private_struct (timeout)" ; return }
}
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
- setup_xfail_format "DWARF 1"
send_gdb "ptype struct mixed_protection_struct\n"
gdb_expect {
-re "type = struct mixed_protection_struct \{${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct mixed_protection_struct (FIXME)"
+ pass "ptype struct mixed_protection_struct"
}
-re "type = struct mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
pass "ptype struct mixed_protection_struct (extra public)"
}
-re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype struct mixed_protection_struct (FIXME)"
+ pass "ptype struct mixed_protection_struct"
}
-re ".*$gdb_prompt $" { fail "ptype struct mixed_protection_struct" }
timeout { fail "ptype struct mixed_protection_struct (timeout)" ; return }
}
- # Accept it as an expected failure if gdb just fails to distinguish between
+ # Accept it if gdb just fails to distinguish between
# class and struct, and everything else is OK.
send_gdb "ptype class public_class\n"
gdb_expect {
-re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class public_class (FIXME)"
+ pass "ptype class public_class"
}
-re "type = struct public_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class public_class (FIXME)"
+ pass "ptype class public_class"
}
-re ".*$gdb_prompt $" { fail "ptype class public_class" }
timeout { fail "ptype class public_class (timeout)" ; return }
@@ -165,27 +156,24 @@ proc test_ptype_class_objects {} {
pass "ptype class protected_class"
}
-re "type = struct protected_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
fail "ptype class protected_class"
}
-re ".*$gdb_prompt $" { fail "ptype class protected_class" }
timeout { fail "ptype class protected_class (timeout)" ; return }
}
- # Accept it as an expected failure if gdb just emits a superflous "private:"
+ # Accept it if gdb just emits a superflous "private:"
# attribute, since classes default to private and for consistency with
# structs (where we don't print the "public:" attribute) we don't print
# the "private:" attribute.
- setup_xfail_format "DWARF 1"
send_gdb "ptype class default_private_class\n"
gdb_expect {
-re "type = class default_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class default_private_class (FIXME)"
+ pass "ptype class default_private_class"
}
-re "type = class default_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class default_private_class (FIXME)"
+ pass "ptype class default_private_class"
}
-re ".*$gdb_prompt $" { fail "ptype class default_private_class" }
timeout { fail "ptype class default_private_class (timeout)" ; return }
@@ -197,10 +185,9 @@ proc test_ptype_class_objects {} {
pass "ptype class explicit_private_class"
}
-re "type = class explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class explicit_private_class (OK for HP aCC)"
+ pass "ptype class explicit_private_class"
}
-re "type = struct explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
fail "ptype class explicit_private_class"
}
-re ".*$gdb_prompt $" { fail "ptype class explicit_private_class" }
@@ -213,7 +200,6 @@ proc test_ptype_class_objects {} {
pass "ptype class mixed_protection_class"
}
-re "type = struct mixed_protection_class \{${ws}int a;${ws}int b;${ws}int c;${ws}int d;${ws}int e;${ws}int f;${ws}int g;${ws}int h;${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
fail "ptype class mixed_protection_class"
}
-re ".*$gdb_prompt $" { fail "ptype class mixed_protection_class" }
@@ -236,7 +222,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class B\n"
gdb_expect {
-re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -254,7 +239,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class C\n"
gdb_expect {
-re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -272,7 +256,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class D\n"
gdb_expect {
-re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -290,7 +273,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class E\n"
gdb_expect {
-re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -354,7 +336,6 @@ proc test_ptype_class_objects {} {
# The format of a g++ virtual base pointer.
set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vB\n"
gdb_expect {
-re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\((vB const|const vB) ?&\\);${ws}vB\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -384,7 +365,6 @@ proc test_ptype_class_objects {} {
# for now, but with a FIXME. At some future point, gdb should use a
# portable representation for the virtual table constructs.
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vC\n"
gdb_expect {
-re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\((vC const|const vC) ?&\\);${ws}vC\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -414,7 +394,6 @@ proc test_ptype_class_objects {} {
# for now, but with a FIXME. At some future point, gdb should use a
# portable representation for the virtual table constructs.
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vD\n"
gdb_expect {
-re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\((vD const|const vD) ?&\\);${ws}vD\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -444,7 +423,6 @@ proc test_ptype_class_objects {} {
# for now, but with a FIXME. At some future point, gdb should use a
# portable representation for the virtual table constructs.
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vE\n"
gdb_expect {
-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\((vE const|const vE) ?&\\);${ws}vE\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
@@ -470,7 +448,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class Base1\n"
gdb_expect {
-re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 & operator=\\(Base1 const ?&\\);${ws}Base1\\(((Base1 const)|(const Base1)) ?&\\);${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" {
@@ -491,7 +468,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class Foo\n"
gdb_expect {
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
@@ -512,7 +488,6 @@ proc test_ptype_class_objects {} {
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class Bar\n"
gdb_expect {
-re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar & operator=\\(Bar const ?&\\);${ws}Bar\\((Bar const|const Bar) ?&\\);${ws}Bar\\(int, int, int\\);${ws}\}$nl$gdb_prompt $" {
@@ -682,23 +657,45 @@ proc test_enums {} {
}
# ptype on the object
- # g++ is putting out the wrong debug info. This works with aCC
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "ptype obj_with_enum\n"
gdb_expect {
-re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)ClassWithEnum::PrivEnum priv_enum;\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { pass "ptype obj_with_enum" }
+ -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)PrivEnum priv_enum;\r\n\[ \t\]*int x;.*\\}\r\n$gdb_prompt $"
+ {
+ # NOTE: carlton/2003-02-28: One could certainly argue that
+ # this output is acceptable: PrivEnum is a member of
+ # ClassWithEnum, so there's no need to explicitly qualify
+ # its name with "ClassWithEnum::". The truth, though, is
+ # that GDB is simply forgetting that PrivEnum is a member
+ # of ClassWithEnum, so we do that output for a bad reason
+ # instead of a good reason. Under stabs, we probably
+ # can't get this right; under DWARF-2, we can.
+ kfail "gdb/57" "ptype obj_with_enum"
+ }
-re "$gdb_prompt $" { fail "ptype obj_with_enum" }
timeout { fail "(timeout) ptype obj_with_enum" }
}
- # g++ is putting out the wrong debug info. This works with aCC
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
+ # We'll do this test twice, because of a parser bug: see
+ # PR gdb/826.
+
send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
gdb_expect {
-re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
+ -re "A parse error in expression, near `42'.\r\n$gdb_prompt $"
+ { kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42" }
-re "$gdb_prompt $" { fail "print (ClassWithEnum::PrivEnum) 42" }
timeout { fail "(timeout) print (ClassWithEnum::PrivEnum) 42" }
}
+
+ send_gdb "print ('ClassWithEnum::PrivEnum') 42\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print ('ClassWithEnum::PrivEnum') 42" }
+ -re "No symbol \"ClassWithEnum::PrivEnum\" in current context.\r\n$gdb_prompt $"
+ { kfail "gdb/57" "print ('ClassWithEnum::PrivEnum') 42" }
+ -re "$gdb_prompt $" { fail "print ('ClassWithEnum::PrivEnum') 42" }
+ timeout { fail "(timeout) print ('ClassWithEnum::PrivEnum') 42" }
+ }
}
#
@@ -737,7 +734,6 @@ proc test_pointers_to_class_members {} {
}
clear_xfail "*-*-*"
- setup_xfail_format "DWARF 1"
gdb_test "print (int)pmi == sizeof(int)" ".* = false" "print (int)pmi == sizeof(int)"
}
@@ -822,11 +818,9 @@ proc test_static_members {} {
"print cnsi without static members"
gdb_test "set print static-members on" ""
- setup_xfail_format "DWARF 1"
gdb_test "print csi" \
"{x = 10, y = 20, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>}}" \
"print csi with static members"
- setup_xfail_format "DWARF 1"
gdb_test "print cnsi" \
"{x = 30, y = 40, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>, static yy = {z = 5, static xx = {x = 1, y = 2, static null = <same as static member of an already seen type>, static yy = <same as static member of an already seen type>}}}, static yy = <same as static member of an already seen type>}" \
"print cnsi with static members"
@@ -856,12 +850,7 @@ proc do_tests {} {
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
- # Get the debug format for the compiled test case.
-
- if [ runto_main ] then {
- get_debug_format
- }
-
+ runto_main
test_ptype_class_objects
if [ runto 'inheritance2' ] then {
diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.exp b/gdb/testsuite/gdb.c++/cplusfuncs.exp
index 6f92817efd9..0a5e1b3f0a1 100644
--- a/gdb/testsuite/gdb.c++/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.c++/cplusfuncs.exp
@@ -552,18 +552,7 @@ proc do_tests {} {
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
- # Get the debug format for the compiled test case. If that
- # format is DWARF 1 then just skip all the tests since none of
- # them will pass.
-
- if [ runto_main] then {
- get_debug_format
- if [ setup_xfail_format "DWARF 1" ] then {
- fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
- return
- }
- clear_xfail "*-*-*"
- }
+ runto_main
probe_demangler
test_paddr_overloaded_functions
diff --git a/gdb/testsuite/gdb.c++/inherit.exp b/gdb/testsuite/gdb.c++/inherit.exp
index 66c2a52adae..86c1f834f11 100644
--- a/gdb/testsuite/gdb.c++/inherit.exp
+++ b/gdb/testsuite/gdb.c++/inherit.exp
@@ -79,7 +79,6 @@ proc test_print_si_members {} {
# Print members of g_B using nonambiguous compact form.
- setup_xfail_format "DWARF 1"
gdb_test "print g_B.a" ".* = 3" "print g_B.a"
gdb_test "print g_B.b" ".* = 5" "print g_B.b"
@@ -98,7 +97,6 @@ proc test_print_si_members {} {
# Print members of g_C using nonambiguous compact form.
- setup_xfail_format "DWARF 1"
gdb_test "print g_C.a" ".* = 7" "print g_C.a"
gdb_test "print g_C.c" ".* = 9" "print g_C.c"
@@ -163,32 +161,26 @@ proc test_ptype_si {} {
# Print class B as a type.
- setup_xfail_format "DWARF 1"
gdb_test "ptype B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype B"
# Print class B as an explicit class.
- setup_xfail_format "DWARF 1"
gdb_test "ptype class B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype class B"
# Print type of an object of type B.
- setup_xfail_format "DWARF 1"
gdb_test "ptype g_B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype g_B"
# Print class C as a type.
- setup_xfail_format "DWARF 1"
gdb_test "ptype C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype C"
# Print class C as an explicit class.
- setup_xfail_format "DWARF 1"
gdb_test "ptype class C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype class C"
# Print type of an object of type g_C.
- setup_xfail_format "DWARF 1"
gdb_test "ptype g_C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype g_C"
# gcc cygnus-2.3.3 (Q1) has this bug, but it was fixed as of
@@ -243,12 +235,10 @@ proc test_print_si_classes {} {
# Print all members of g_B.
- setup_xfail_format "DWARF 1"
gdb_test "print g_B" ".* = \{\<(class |)A\> = \{a = 3, x = 4\}, b = 5, x = 6\}" "print g_B"
# Print all members of g_C.
- setup_xfail_format "DWARF 1"
gdb_test "print g_C" ".* = \{\<(class |)A\> = \{a = 7, x = 8\}, c = 9, x = 10\}" "print g_C"
}
@@ -266,9 +256,7 @@ proc test_print_anon_union {} {
global ws
global nl
- setup_xfail_format "DWARF 1"
gdb_test "print g_anon_union.a" ".* = 2" "print anonymous union member"
- setup_xfail_format "DWARF 1"
send_gdb "print g_anon_union\n"
gdb_expect {
-re ".* = \{one = 1, ( = |)\{a = 2, b = 2\}\}$nl$gdb_prompt $" {
@@ -284,7 +272,6 @@ proc test_print_anon_union {} {
fail "print variableof type anonymous union (timeout)"
}
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype g_anon_union\n"
gdb_expect {
-re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}public:${ws}int a;${ws}long int b;${ws}union \{\.\.\.\} & operator=\\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(\\);${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(void\\);${ws}\}$nl$gdb_prompt $" {
@@ -393,10 +380,8 @@ proc test_print_mi_members {} {
gdb_test "print g_D.B::x" ".* = 14" "print g_D.B::x"
- setup_xfail_format "DWARF 1"
gdb_test "print g_D.C::c" ".* = 17" "print g_D.C::c"
- setup_xfail_format "DWARF 1"
gdb_test "print g_D.C::x" ".* = 18" "print g_D.C::x"
gdb_test "print g_D.D::d" ".* = 19" "print g_D.D::d"
@@ -447,10 +432,8 @@ proc test_print_mi_members {} {
gdb_test "print g_E.B::x" ".* = 24" "print g_E.B::x"
- setup_xfail_format "DWARF 1"
gdb_test "print g_E.C::c" ".* = 27" "print g_E.C::c"
- setup_xfail_format "DWARF 1"
gdb_test "print g_E.C::x" ".* = 28" "print g_E.C::x"
gdb_test "print g_E.D::d" ".* = 29" "print g_E.D::d"
@@ -469,22 +452,16 @@ proc test_print_mi_members {} {
proc test_ptype_mi {} {
global nl
- setup_xfail_format "DWARF 1"
gdb_test "ptype D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype D"
- setup_xfail_format "DWARF 1"
gdb_test "ptype class D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype class D"
- setup_xfail_format "DWARF 1"
gdb_test "ptype g_D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype g_D"
- setup_xfail_format "DWARF 1"
gdb_test "ptype E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype E"
- setup_xfail_format "DWARF 1"
gdb_test "ptype class E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype class E"
- setup_xfail_format "DWARF 1"
gdb_test "ptype g_E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype g_E"
}
@@ -495,12 +472,10 @@ proc test_ptype_mi {} {
proc test_print_mi_classes {} {
# Print all members of g_D.
- setup_xfail_format "DWARF 1"
gdb_test "print g_D" ".* = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 15, x = 16\}, c = 17, x = 18\}, d = 19, x = 20\}" "print g_D"
# Print all members of g_E.
- setup_xfail_format "DWARF 1"
gdb_test "print g_E" ".* = \{\<(class |)D\> = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}" "print g_E"
}
@@ -527,7 +502,6 @@ proc test_print_svi_members {} {
# Print all members of g_vB.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vB.vA::va\n"
gdb_expect {
-re ".* = 3$nl$gdb_prompt $" { pass "print g_vB.vA::va" }
@@ -541,7 +515,6 @@ proc test_print_svi_members {} {
timeout { fail "print g_vB.vA::va (timeout)" ; return }
}
- setup_xfail_format "DWARF 1"
gdb_test "print g_vB.vA::vx" ".* = 4" "print g_vB.vA::vx"
gdb_test "print g_vB.vB::vb" ".* = 5" "print g_vB.vB::vb"
@@ -550,7 +523,6 @@ proc test_print_svi_members {} {
# Print members of g_vB using compact form.
- setup_xfail_format "DWARF 1"
gdb_test "print g_vB.va" ".* = 3" "print g_vB.va"
gdb_test "print g_vB.vb" ".* = 5" "print g_vB.vb"
@@ -559,10 +531,8 @@ proc test_print_svi_members {} {
# Print all members of g_vC.
- setup_xfail_format "DWARF 1"
gdb_test "print g_vC.vA::va" ".* = 7" "print g_vC.vA::va"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vC.vA::vx" ".* = 8" "print g_vC.vA::vx"
gdb_test "print g_vC.vC::vc" ".* = 9" "print g_vC.vC::vc"
@@ -571,7 +541,6 @@ proc test_print_svi_members {} {
# Print members of g_vC using compact form.
- setup_xfail_format "DWARF 1"
gdb_test "print g_vC.va" ".* = 7" "print g_vC.va"
gdb_test "print g_vC.vc" ".* = 9" "print g_vC.vc"
@@ -631,7 +600,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype g_vA (timeout)" ; return }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype vB\n"
gdb_expect {
-re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \\*${vbptr}vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -644,7 +612,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype vB (timeout)" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vB\n"
gdb_expect {
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -657,7 +624,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype class vB (timeout)" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype g_vB\n"
gdb_expect {
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -670,7 +636,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype g_vB (timeout)" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype vC\n"
gdb_expect {
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -683,7 +648,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype vC (timeout)" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vC\n"
gdb_expect {
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -696,7 +660,6 @@ proc test_ptype_vi {} {
timeout { fail "ptype class vC (timeout)" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype g_vC\n"
gdb_expect {
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
@@ -727,7 +690,6 @@ proc test_print_svi_classes {} {
# Print all members of g_vB.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vB\n"
gdb_expect {
-re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, Virtual table at $hex\}$nl$gdb_prompt $" {
@@ -754,7 +716,6 @@ proc test_print_svi_classes {} {
# Print all members of g_vC.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vC\n"
gdb_expect {
-re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, Virtual table at $hex\}$nl$gdb_prompt $" {
@@ -785,7 +746,6 @@ proc test_print_mvi_members {} {
# Print all members of g_vD.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vD.vA::va\n"
gdb_expect {
-re ".* = 19$nl$gdb_prompt $" { pass "print g_vD.vA::va" }
@@ -799,19 +759,14 @@ proc test_print_mvi_members {} {
timeout { fail "print g_vD.vA::va (timeout)" ; return }
}
- setup_xfail_format "DWARF 1"
gdb_test "print g_vD.vA::vx" ".* = 20" "print g_vD.vA::vx"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vD.vB::vb" ".* = 21" "print g_vD.vB::vb"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vD.vB::vx" ".* = 22" "print g_vD.vB::vx"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vD.vC::vc" ".* = 23" "print g_vD.vC::vc"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vD.vC::vx" ".* = 24" "print g_vD.vC::vx"
gdb_test "print g_vD.vD::vd" ".* = 25" "print g_vD.vD::vd"
@@ -820,25 +775,18 @@ proc test_print_mvi_members {} {
# Print all members of g_vE.
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vA::va" ".* = 0" "print g_vE.vA::va"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vA::vx" ".* = 0" "print g_vE.vA::vx"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vB::vb" ".* = 0" "print g_vE.vB::vb"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vB::vx" ".* = 0" "print g_vE.vB::vx"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vC::vc" ".* = 0" "print g_vE.vC::vc"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vC::vx" ".* = 0" "print g_vE.vC::vx"
- setup_xfail_format "DWARF 1"
gdb_test "print g_vE.vD::vd" ".* = 0" "print g_vE.vD::vd"
gdb_test "print g_vE.vD::vx" ".* = 0" "print g_vE.vD::vx"
@@ -858,7 +806,6 @@ proc test_ptype_mvi {} {
global nl
global vbptr
- setup_xfail_format "DWARF 1"
send_gdb "ptype vD\n"
gdb_expect {
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -871,7 +818,6 @@ proc test_ptype_mvi {} {
timeout { fail "(timeout) ptype vD" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vD\n"
gdb_expect {
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -884,7 +830,6 @@ proc test_ptype_mvi {} {
timeout { fail "(timeout) ptype class vD" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype g_vD\n"
gdb_expect {
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -897,7 +842,6 @@ proc test_ptype_mvi {} {
timeout { fail "(timeout) ptype g_vD" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype vE\n"
gdb_expect {
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -910,7 +854,6 @@ proc test_ptype_mvi {} {
timeout { fail "(timeout) ptype vE" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype class vE\n"
gdb_expect {
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -923,7 +866,6 @@ proc test_ptype_mvi {} {
timeout { fail "(timeout) ptype class vE" }
}
- setup_xfail_format "DWARF 1"
send_gdb "ptype g_vE\n"
gdb_expect {
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
@@ -950,7 +892,6 @@ proc test_print_mvi_classes {} {
# Print all members of g_vD.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vD\n"
gdb_expect {
-re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, Virtual table at $hex\}, \<class vC\> = \{vc = 23, vx = 24, Virtual table at $hex\}, vd = 25, vx = 26, Virtual table at $hex\}$nl$gdb_prompt $" {
@@ -977,7 +918,6 @@ proc test_print_mvi_classes {} {
# Print all members of g_vE.
- setup_xfail_format "DWARF 1"
send_gdb "print g_vE\n"
gdb_expect {
-re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, Virtual table at $hex\}, \<class vC\> = \{vc = 0, vx = 0, Virtual table at $hex\}, vd = 0, vx = 0, Virtual table at $hex\}, ve = 27, vx = 28, Virtual table at $hex\}$nl$gdb_prompt $" {
@@ -1022,8 +962,6 @@ proc do_tests {} {
if { ![ runto_main] } {
gdb_suppress_tests;
- } else {
- get_debug_format
}
test_ptype_si
diff --git a/gdb/testsuite/gdb.c++/local.cc b/gdb/testsuite/gdb.c++/local.cc
index 5bfc44ac43b..85fd6e14a87 100644
--- a/gdb/testsuite/gdb.c++/local.cc
+++ b/gdb/testsuite/gdb.c++/local.cc
@@ -4,6 +4,9 @@ void marker1 (void)
{
}
+void marker2 (void)
+{
+}
int foobar (int x)
{
@@ -20,6 +23,8 @@ int foobar (int x)
static Local l1;
char c;
+ marker1 ();
+
l.loc1 = 23;
c = l.loc_foo('x');
@@ -56,6 +61,6 @@ int main()
il.ilc = 'b';
il.ip = &c;
- marker1();
+ marker2();
}
}
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
index 971567d3054..21ceb7ae3db 100644
--- a/gdb/testsuite/gdb.c++/local.exp
+++ b/gdb/testsuite/gdb.c++/local.exp
@@ -67,7 +67,7 @@ if ![runto 'marker1'] then {
continue
}
-gdb_test "up" ".*main.*" "up from marker1"
+gdb_test "up" ".*foobar.*" "up from marker1"
# Local classes in g++ get names like "main.1::InnerLocal", just like local
# static variables. Some targets use "___" instead of ".".
@@ -102,8 +102,7 @@ send_gdb "ptype Local\n"
gdb_expect {
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
- # setup_kfail "gdb/483"
- fail "ptype Local (gdb/483)"
+ kfail "gdb/483" "ptype Local"
}
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { xpass "ptype Local (old aCC)" }
@@ -111,6 +110,36 @@ gdb_expect {
timeout { fail "(timeout) ptype Local" }
}
+gdb_test "break marker2"
+gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker2.*" \
+ "continuing to marker2"
+
+gdb_test "up" ".*main.*" "up from marker2"
+
+# Make sure that `Local' isn't in scope here; it's local to foobar.
+# setup_kfail "gdb/825"
+send_gdb "ptype Local\n"
+set eol "\[\t \]*\[\r\n\]+\[\t \]*"
+gdb_expect {
+ -re "No symbol \"Local\" in current context.*${gdb_prompt} $" {
+ pass "Local out of scope"
+ }
+ -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol}.*${eol} char loc_foo\\(char\\);${eol}}${eol}${gdb_prompt} " {
+ # GCC emits STABS debugging information in a way that doesn't
+ # properly preserve the scoping of local classes. I think
+ # we'd need to start using Sun's extensions to stabs to get
+ # this right.
+ kfail gdb/825 "Local out of scope"
+ }
+ -re ".*${gdb_prompt} $" {
+ fail "Local out of scope"
+ }
+ timeout {
+ fail "Local out of scope (timeout)"
+ }
+}
+
+
# DTS CLLbs14316 and CLLbs17058
# coulter - I added a clause for HP's aCC compiler. We print out the type
# as xx instead of const unsigned char, but we still have an expected failure
diff --git a/gdb/testsuite/gdb.c++/overload.cc b/gdb/testsuite/gdb.c++/overload.cc
index 97083c5640c..2f467154bdb 100644
--- a/gdb/testsuite/gdb.c++/overload.cc
+++ b/gdb/testsuite/gdb.c++/overload.cc
@@ -45,6 +45,11 @@ int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
};
+int intToChar (char c)
+{
+ return 297;
+}
+
void marker1()
{}
@@ -72,6 +77,8 @@ int main ()
breakpoint();
#endif
+ // Verify that intToChar should work:
+ intToChar(1);
marker1();
return 0;
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index 7bfae108522..227b0553ced 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.exp
@@ -378,3 +378,5 @@ gdb_test "list foo::overloadfnarg(int, int (*)(int))" \
gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \
"int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
"list overloaded function with function ptr args - quotes around argument"
+
+gdb_test "print intToChar(1)" ".\[0-9\]* = 297"
diff --git a/gdb/testsuite/gdb.c++/ovldbreak.exp b/gdb/testsuite/gdb.c++/ovldbreak.exp
index 9852cb597b1..043243d23ff 100644
--- a/gdb/testsuite/gdb.c++/ovldbreak.exp
+++ b/gdb/testsuite/gdb.c++/ovldbreak.exp
@@ -312,7 +312,11 @@ gdb_test "info break" \
# Run through each breakpoint.
-proc continue_to_bp_overloaded {bpnumber argtype actuals} {
+# NOTE: carlton/2003-02-03: I'm seeing failures on some of the tests,
+# with the wrong arg being printed out. Michael Chastain sees
+# failures at times, too, albeit fewer than I do.
+
+proc continue_to_bp_overloaded {might_kfail bpnumber argtype actuals} {
global gdb_prompt hex decimal srcfile
send_gdb "continue\n"
@@ -320,6 +324,13 @@ proc continue_to_bp_overloaded {bpnumber argtype actuals} {
-re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}(, )?${actuals}\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
pass "continue to bp overloaded : ${argtype}"
}
+ -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}, arg=.*\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
+ if $might_kfail {
+ kfail "gdb/1025" "continue to bp overloaded : ${argtype}"
+ } else {
+ fail "continue to bp overloaded : ${argtype}"
+ }
+ }
-re ".*$gdb_prompt $" {
fail "continue to bp overloaded : ${argtype}"
}
@@ -329,18 +340,18 @@ proc continue_to_bp_overloaded {bpnumber argtype actuals} {
}
}
-continue_to_bp_overloaded 25 "(void|)" ""
-continue_to_bp_overloaded 24 "char" "arg=2 \\'\\\\002\\'"
-continue_to_bp_overloaded 23 "signed char" "arg=3 \\'\\\\003\\'"
-continue_to_bp_overloaded 22 "unsigned char" "arg=4 \\'\\\\004\\'"
-continue_to_bp_overloaded 21 "short" "arg=5"
-continue_to_bp_overloaded 20 "unsigned short" "arg=6"
-continue_to_bp_overloaded 19 "int" "arg=7"
-continue_to_bp_overloaded 18 "(unsigned|unsigned int)" "arg=8"
-continue_to_bp_overloaded 17 "long" "arg=9"
-continue_to_bp_overloaded 16 "unsigned long" "arg=10"
-continue_to_bp_overloaded 15 "float" "arg=100"
-continue_to_bp_overloaded 14 "double" "arg=200"
+continue_to_bp_overloaded 0 25 "(void|)" ""
+continue_to_bp_overloaded 1 24 "char" "arg=2 \\'\\\\002\\'"
+continue_to_bp_overloaded 1 23 "signed char" "arg=3 \\'\\\\003\\'"
+continue_to_bp_overloaded 1 22 "unsigned char" "arg=4 \\'\\\\004\\'"
+continue_to_bp_overloaded 1 21 "short" "arg=5"
+continue_to_bp_overloaded 1 20 "unsigned short" "arg=6"
+continue_to_bp_overloaded 0 19 "int" "arg=7"
+continue_to_bp_overloaded 0 18 "(unsigned|unsigned int)" "arg=8"
+continue_to_bp_overloaded 0 17 "long" "arg=9"
+continue_to_bp_overloaded 0 16 "unsigned long" "arg=10"
+continue_to_bp_overloaded 0 15 "float" "arg=100"
+continue_to_bp_overloaded 1 14 "double" "arg=200"
diff --git a/gdb/testsuite/gdb.c++/pr-1023.cc b/gdb/testsuite/gdb.c++/pr-1023.cc
new file mode 100644
index 00000000000..758308481dc
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1023.cc
@@ -0,0 +1,20 @@
+class myClass
+{
+ public:
+ myClass() {};
+ ~myClass() {};
+ void performUnblocking( short int cell_index );
+ void performBlocking( int cell_index );
+};
+
+void myClass::performUnblocking( short int cell_index ) {}
+
+void myClass::performBlocking( int cell_index ) {}
+
+int main ()
+{
+ myClass mc;
+ mc.performBlocking (0);
+ mc.performUnblocking (0);
+}
+
diff --git a/gdb/testsuite/gdb.c++/pr-1023.exp b/gdb/testsuite/gdb.c++/pr-1023.exp
new file mode 100644
index 00000000000..c8c98027471
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1023.exp
@@ -0,0 +1,79 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Tests for PR gdb/1023.
+# 2003-02-03 Michael Chastain <mec@shout.net>
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_cplus_tests] } { continue }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "pr-1023"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+send_gdb "break myClass::performBlocking\n"
+gdb_expect {
+ -re "Breakpoint $decimal at $hex: file .*$srcfile, line 12.*$gdb_prompt $" {
+ pass "break myClass::performBlocking"
+ }
+ -re "the class myClass does not have any method named performBlocking.*$gdb_prompt $" {
+ # fails with gcc 2.95.3 -gstabs+, native i686-pc-linux-gnu
+ # -- chastain 2003-02-03
+ kfail "gdb/1023" "break myClass::performBlocking"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "break myClass::performBlocking"
+ }
+ timeout {
+ fail "break myClass::performBlocking (timeout)"
+ }
+}
+
+gdb_test \
+ "break myClass::performUnblocking" \
+ "Breakpoint $decimal at $hex: file .*$srcfile, line 10.*"
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp
index a6d35fcb116..7ef1c1d7f72 100644
--- a/gdb/testsuite/gdb.c++/templates.exp
+++ b/gdb/testsuite/gdb.c++/templates.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002
+# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -192,18 +192,7 @@ proc do_tests {} {
return
}
- # Get the debug format for the compiled test case. If that
- # format is DWARF 1 then just skip all the tests since none of
- # them will pass.
-
- if [ runto_main] then {
- get_debug_format
- if [ setup_xfail_format "DWARF 1" ] then {
- fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
- return
- }
- clear_xfail "*-*-*"
- }
+ runto_main
test_ptype_of_templates
test_template_breakpoints
@@ -253,17 +242,30 @@ gdb_expect {
# Template Foo<T>
-setup_xfail hppa64-*-* CLLbs16092
-# g++ can't do the template instantiation in debug info trick, so we
-# fail this because it's not a real type.
-if {!$hp_aCC_compiler} { setup_xfail *-*-* }
+# Neither stabs nor DWARF-2 contains type information about templates
+# (as opposed to instantiations of templates), so in those
+# circumstances we expect GDB to not find a symbol. HP has a debug
+# format that contains more info, though, so it's also correct to
+# print out template info. (This affects several subsequent tests as
+# well.)
+
+# NOTE: carlton/2003-02-26: However, because of a bug in the way GDB
+# handles nested types, we don't get this right in the DWARF-2 case.
+
send_gdb "ptype Foo\n"
gdb_expect {
- -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Foo<volatile char \\*>\r\n\[ \t\]*(class |)Foo<char>\r\n\[ \t\]*(class |)Foo<int>\r\n$gdb_prompt $" { pass "ptype Foo" }
- -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Foo" }
- -re "$gdb_prompt $" { fail "ptype Foo" }
- timeout { fail "(timeout) ptype Foo" }
+ -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Foo<volatile char \\*>\r\n\[ \t\]*(class |)Foo<char>\r\n\[ \t\]*(class |)Foo<int>\r\n$gdb_prompt $" { pass "ptype Foo" }
+ -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Foo" }
+ -re "type = class Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int foo\\(int, int\\);\r\n\\}\r\n$gdb_prompt $"
+ { # GCC 3.1, DWARF-2 output.
+ kfail "gdb/57" "ptype Foo" }
+ -re "No symbol \"Foo\" in current context.\r\n$gdb_prompt $"
+ { # GCC 2.95.3, stabs+ output.
+ pass "ptype Foo" }
+ -re "$gdb_prompt $" { fail "ptype Foo" }
+ timeout { fail "(timeout) ptype Foo" }
}
+# -re "type = class Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int foo(int, int);\r\n\\}\r\n$gdb_prompt $"
# ptype Foo<int>
@@ -294,24 +296,48 @@ gdb_expect {
# print a function from Foo<volatile char *>
+# This test is sensitive to whitespace matching, so we'll do it twice,
+# varying the spacing, because of PR gdb/33.
+
send_gdb "print Foo<volatile char *>::foo\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char \\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
- -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
- timeout { fail "(timeout) print Foo<volatile char *>::foo" }
+ -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
+ -re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $"
+ {
+ # This used to be a kfail gdb/33, but it shouldn't occur any more now.
+ fail "print Foo<volatile char *>::foo"
+ }
+ -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
+ timeout { fail "(timeout) print Foo<volatile char *>::foo" }
+}
+
+send_gdb "print Foo<volatile char*>::foo\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
+ -re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $"
+ {
+ # This used to be a kfail gdb/33, but it shouldn't occur any more now.
+ fail "print Foo<volatile char *>::foo"
+ }
+ -re "$gdb_prompt $" { fail "print Foo<volatile char*>::foo" }
+ timeout { fail "(timeout) print Foo<volatile char*>::foo" }
}
# Template Bar<T, int>
-setup_xfail hppa64-*-* CLLbs16092
# same as Foo for g++
-if {!$hp_aCC_compiler} { setup_xfail *-*-* }
send_gdb "ptype Bar\n"
gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)1>\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)33>\r\n$gdb_prompt $" { pass "ptype Bar" }
- -re "type = <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Bar" }
- -re "$gdb_prompt $" { fail "ptype Bar" }
- timeout { fail "(timeout) ptype Bar" }
+ -re "type = template <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)1>\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)33>\r\n$gdb_prompt $" { pass "ptype Bar" }
+ -re "type = <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Bar" }
+ -re "ptype Bar\r\ntype = class Bar<int,33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.1, DWARF-2 output.
+ kfail "gdb/57" "ptype Bar" }
+ -re "No symbol \"Bar\" in current context.\r\n$gdb_prompt $"
+ { # GCC 2.95.3, stabs+ output.
+ pass "ptype Bar" }
+ -re "$gdb_prompt $" { fail "ptype Bar" }
+ timeout { fail "(timeout) ptype Bar" }
}
@@ -335,15 +361,19 @@ gdb_expect {
# Template Baz<T, char>
-setup_xfail hppa64-*-* CLLbs16092
# Same as Foo, for g++
-if {!$hp_aCC_compiler} { setup_xfail *-*-* }
send_gdb "ptype Baz\n"
gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
- -re "type = <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
- -re "$gdb_prompt $" { fail "ptype Baz" }
- timeout { fail "(timeout) ptype Baz" }
+ -re "type = template <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
+ -re "type = <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
+ -re "type = class Baz<int,'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.1, DWARF-2 output.
+ kfail "gdb/57" "ptype Baz" }
+ -re "No symbol \"Baz\" in current context.\r\n$gdb_prompt $"
+ { # GCC 2.95.3, stabs+ output.
+ pass "ptype Baz" }
+ -re "$gdb_prompt $" { fail "ptype Baz" }
+ timeout { fail "(timeout) ptype Baz" }
}
@@ -367,13 +397,18 @@ gdb_expect {
# Template Qux<T, int (*f)(int) >
# Same as Foo for g++
-if {!$hp_aCC_compiler} {setup_xfail *-*-*}
send_gdb "ptype Qux\n"
gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
- -re ".*type = template <(class |)T.*, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
- -re "$gdb_prompt $" { fail "ptype Qux" }
- timeout { fail "(timeout) ptype Qux" }
+ -re "type = template <(class |)T, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
+ -re ".*type = template <(class |)T.*, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
+ -re "type = class Qux<char,&string> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.1, DWARF-2 output.
+ kfail "gdb/57" "ptype Qux" }
+ -re "No symbol \"Qux\" in current context.\r\n$gdb_prompt $"
+ { # GCC 2.95.3, stabs+ output.
+ pass "ptype Qux" }
+ -re "$gdb_prompt $" { fail "ptype Qux" }
+ timeout { fail "(timeout) ptype Qux" }
}
# pt Qux<int,&string>
@@ -398,15 +433,19 @@ gdb_expect {
# Template Spec<T1, T2>
-setup_xfail hppa64-*-* CLLbs16092
# Same as Foo for g++
-if {!$hp_aCC_compiler} { setup_xfail *-*-* }
send_gdb "ptype Spec\n"
gdb_expect {
- -re "type = template <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Spec<int,int \\*>\r\n\[ \t\]*(class |)Spec<int,char>\r\n$gdb_prompt $" { pass "ptype Spec" }
- -re "type = <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Spec" }
- -re "$gdb_prompt $" { fail "ptype Spec" }
- timeout { fail "(timeout) ptype Spec" }
+ -re "type = template <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Spec<int,int \\*>\r\n\[ \t\]*(class |)Spec<int,char>\r\n$gdb_prompt $" { pass "ptype Spec" }
+ -re "type = <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Spec" }
+ -re "type = class Spec<int,char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.1, DWARF-2 output.
+ kfail "gdb/57" "ptype Spec" }
+ -re "No symbol \"Spec\" in current context.\r\n$gdb_prompt $"
+ { # GCC 2.95.3, stabs+ output.
+ pass "ptype Spec" }
+ -re "$gdb_prompt $" { fail "ptype Spec" }
+ timeout { fail "(timeout) ptype Spec" }
}
# pt Spec<char,0>
diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.c++/virtfunc.exp
index 2741cf6293a..dbd575cfb32 100644
--- a/gdb/testsuite/gdb.c++/virtfunc.exp
+++ b/gdb/testsuite/gdb.c++/virtfunc.exp
@@ -915,12 +915,11 @@ proc test_virtual_calls {} {
#
# -- chastain 2002-02-20
- if {$gcc_compiled} then { setup_xfail "*-*-*" }
-
send_gdb "print pEe->D::vg()\n"
- setup_xfail "*-*-*"
gdb_expect {
-re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
+ -re "Attempt to take address of value not located in memory.\r\n$gdb_prompt $"
+ { kfail "gdb/1064" "print pEe->D::vg()" }
-re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
timeout { fail "print pEe->D::vg() (timeout)" }
eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
@@ -937,18 +936,7 @@ proc do_tests {} {
gdb_start;
gdb_virtfunc_init;
- # Get the debug format for the compiled test case. If that
- # format is DWARF 1 then just skip all the tests since none of
- # them will pass.
-
- if [ runto_main ] then {
- get_debug_format
- if [ setup_xfail_format "DWARF 1" ] then {
- fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
- return
- }
- clear_xfail "*-*-*"
- }
+ runto_main
test_ptype_of_classes
diff --git a/gdb/testsuite/gdb.disasm/Makefile.in b/gdb/testsuite/gdb.disasm/Makefile.in
index 7cb1b1e2a8e..0db2a26ca1b 100644
--- a/gdb/testsuite/gdb.disasm/Makefile.in
+++ b/gdb/testsuite/gdb.disasm/Makefile.in
@@ -7,7 +7,7 @@ all info install-info dvi install uninstall installcheck check:
@echo "Nothing to be done for $@..."
clean mostlyclean:
- -rm -f *.o *.diff *~ *.bad core h8300s hppa mn10200 mn10300 sh3
+ -rm -f *.o *.diff *~ *.bad core h8300s hppa mn10300 sh3
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
diff --git a/gdb/testsuite/gdb.disasm/mn10200.exp b/gdb/testsuite/gdb.disasm/mn10200.exp
index 33cdb47c5c7..a47b341545f 100644
--- a/gdb/testsuite/gdb.disasm/mn10200.exp
+++ b/gdb/testsuite/gdb.disasm/mn10200.exp
@@ -1,478 +1,478 @@
-
-# Copyright 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Jeff Law. (law@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if ![istarget "mn10200*-*-*"] {
- verbose "Tests ignored for all but mn10200 based targets."
- return
-}
-
-global exec_output
-set prms_id 0
-set bug_id 0
-
-set testfile "mn10200"
-set srcfile ${srcdir}/${subdir}/${testfile}.s
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-proc add_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12i add_tests\n"
- gdb_expect {
- -re "
-.*add d1,d2.*
-.*add d2,a3.*
-.*add a2,d1.*
-.*add a3,a2.*
-.*add 16,d1.*
-.*add 256,d2.*
-.*add 131071,d3.*
-.*add 16,a1.*
-.*add 256,a2.*
-.*add 131071,a3.*
-.*addc d1,d2.*
-.*addnf 16,a2.*
-.*$gdb_prompt $" { pass "add tests" }
- -re "$gdb_prompt $" { fail "add tests" }
- timeout { fail "(timeout) add tests" }
- }
-}
-
-proc bcc_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/15i bCC_tests\n"
- gdb_expect {
- -re "
-.*beq 0x\[0-9a-f]+ <bCC_tests>.*
-.*bne 0x\[0-9a-f]+ <bCC_tests>.*
-.*bgt 0x\[0-9a-f]+ <bCC_tests>.*
-.*bge 0x\[0-9a-f]+ <bCC_tests>.*
-.*ble 0x\[0-9a-f]+ <bCC_tests>.*
-.*blt 0x\[0-9a-f]+ <bCC_tests>.*
-.*bhi 0x\[0-9a-f]+ <bCC_tests>.*
-.*bcc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bls 0x\[0-9a-f]+ <bCC_tests>.*
-.*bcs 0x\[0-9a-f]+ <bCC_tests>.*
-.*bvc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bvs 0x\[0-9a-f]+ <bCC_tests>.*
-.*bnc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bns 0x\[0-9a-f]+ <bCC_tests>.*
-.*bra 0x\[0-9a-f]+ <bCC_tests>.*
-.*$gdb_prompt $" { pass "bCC tests" }
- -re "$gdb_prompt $" { fail "bCC tests" }
- timeout { fail "(timeout) bCC tests" }
- }
-}
-
-proc bccx_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/14i bCCx_tests\n"
- gdb_expect {
- -re "
-.*beqx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bnex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bgtx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bgex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*blex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bltx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bhix 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bccx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*blsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bcsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bvcx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bvsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bncx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bnsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*$gdb_prompt $" { pass "bCCx tests" }
- -re "$gdb_prompt $" { fail "bCCx tests" }
- timeout { fail "(timeout) bCCx tests" }
- }
-}
-
-proc bit_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/4 bit_tests\n"
- gdb_expect {
- -re "
-.*btst 64,d1.*
-.*btst 8192,d2.*
-.*bset d1,\\(a2\\).*
-.*bclr d1,\\(a2\\).*
-.*$gdb_prompt $" { pass "bit tests" }
- -re "$gdb_prompt $" { fail "bit tests" }
- timeout { fail "(timeout) bit tests" }
- }
-}
-
-proc cmp_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9i cmp_tests\n"
- gdb_expect {
- -re "
-.*cmp d1,d2.*
-.*cmp d2,a3.*
-.*cmp a3,d3.*
-.*cmp a3,a2.*
-.*cmp 16,d3.*
-.*cmp 256,d2.*
-.*cmp 131071,d1.*
-.*cmp 256,a2.*
-.*cmp 131071,a1.*
-.*$gdb_prompt $" { pass "cmp tests" }
- -re "$gdb_prompt $" { fail "cmp tests" }
- timeout { fail "(timeout) cmp tests" }
- }
-}
-
-proc extend_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/5i extend_tests\n"
- gdb_expect {
- -re "
-.*ext d1.*
-.*extx d2.*
-.*extxu d3.*
-.*extxb d2.*
-.*extxbu d1.*
-.*$gdb_prompt $" { pass "extend tests" }
- -re "$gdb_prompt $" { fail "extend tests" }
- timeout { fail "(timeout) extend tests" }
- }
-}
-
-proc logical_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/11i logical_tests\n"
- gdb_expect {
- -re "
-.*and d1,d2.*
-.*and 127,d2.*
-.*and 32767,d3.*
-.*and 32767,psw.*
-.*or d1,d2.*
-.*or 127,d2.*
-.*or 32767,d3.*
-.*or 32767,psw.*
-.*xor d1,d2.*
-.*xor 32767,d3.*
-.*not d3.*
-.*$gdb_prompt $" { pass "logical tests" }
- -re "$gdb_prompt $" { fail "logical tests" }
- timeout { fail "(timeout) logical tests" }
- }
-}
-
-proc mov_tests_1 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12i mov_tests_1\n"
- gdb_expect {
- -re "
-.*mov d1,a2.*
-.*mov a2,d1.*
-.*mov d1,d2.*
-.*mov a2,a1.*
-.*mov psw,d3.*
-.*mov d2,psw.*
-.*mov mdr,d1.*
-.*mov d2,mdr.*
-.*mov \\(a2\\),d1.*
-.*mov \\(8,a2\\),d1.*
-.*mov \\(256,a2\\),d1.*
-.*mov \\(131071,a2\\),d1.*
-.*$gdb_prompt $" { pass "mov1 tests" }
- -re "$gdb_prompt $" { fail "mov1 tests" }
- timeout { fail "(timeout) mov1 tests" }
- }
-}
-
-proc mov_tests_2 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9 mov_tests_2\n"
- gdb_expect {
- -re "
-.*mov \\(d1,a1\\),d2.*
-.*mov \\(0x8000.*\\),d1.*
-.*mov \\(0x1ffff.*\\),d1.*
-.*mov \\(8,a2\\),a1.*
-.*mov \\(256,a2\\),a1.*
-.*mov \\(131071,a2\\),a1.*
-.*mov \\(d1,a1\\),a2.*
-.*mov \\(0x8000.*\\),a1.*
-.*mov \\(0x1ffff.*\\),a1.*
-.*$gdb_prompt $" { pass "mov2 tests" }
- -re "$gdb_prompt $" { fail "mov2 tests" }
- timeout { fail "(timeout) mov2 tests" }
- }
-}
-
-proc mov_tests_3 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/10 mov_tests_3\n"
- gdb_expect {
- -re "
-.*mov d1,\\(a2\\).*
-.*mov d1,\\(32,a2\\).*
-.*mov d1,\\(256,a2\\).*
-.*mov d1,\\(131071,a2\\).*
-.*mov d1,\\(d2,a2\\).*
-.*mov d1,\\(0x80.*\\).*
-.*mov d1,\\(0x1ffff.*\\).*
-.*mov a1,\\(32,a2\\).*
-.*mov a1,\\(256,a2\\).*
-.*mov a1,\\(131071,a2\\).*
-.*$gdb_prompt $" { pass "mov3 tests" }
- -re "$gdb_prompt $" { fail "mov3 tests" }
- timeout { fail "(timeout) mov3 tests" }
- }
-}
-
-proc mov_tests_4 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/8 mov_tests_4\n"
- gdb_expect {
- -re "
-.*mov a1,\\(d2,a2\\).*
-.*mov a1,\\(0x80.*\\).*
-.*mov a1,\\(0x1ffff.*\\).*
-.*mov 8,d1.*
-.*mov 256,d1.*
-.*mov 131071,d1.*
-.*mov 256,a1.*
-.*mov 131071,a1.*
-.*$gdb_prompt $" { pass "mov4 tests" }
- -re "$gdb_prompt $" { fail "mov4 tests" }
- timeout { fail "(timeout) mov4 tests" }
- }
-}
-
-proc movb_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12 movb_tests\n"
- gdb_expect {
- -re "
-.*movb \\(8,a2\\),d1.*
-.*movb \\(256,a2\\),d1.*
-.*movb \\(131071,a2\\),d1.*
-.*movb \\(d2,a2\\),d3.*
-.*movb \\(0x1ffff.*\\),d2.*
-.*movb d1,\\(a2\\).*
-.*movb d1,\\(8,a2\\).*
-.*movb d1,\\(256,a2\\).*
-.*movb d1,\\(131071,a2\\).*
-.*movb d1,\\(d2,a2\\).*
-.*movb d1,\\(0x100.*\\).*
-.*movb d1,\\(0x1ffff.*\\).*
-.*$gdb_prompt $" { pass "movb tests" }
- -re "$gdb_prompt $" { fail "movb tests" }
- timeout { fail "(timeout) movb tests" }
- }
-}
-
-proc movbu_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/7 movbu_tests\n"
- gdb_expect {
- -re "
-.*movbu \\(a2\\),d1.*
-.*movbu \\(8,a2\\),d1.*
-.*movbu \\(256,a2\\),d1.*
-.*movbu \\(131071,a2\\),d1.*
-.*movbu \\(d1,a1\\),d2.*
-.*movbu \\(0x8000.*\\),d1.*
-.*movbu \\(0x1ffff.*\\),d1.*
-.*$gdb_prompt $" { pass "movbu tests" }
- -re "$gdb_prompt $" { fail "movbu tests" }
- timeout { fail "(timeout) movbu tests" }
- }
-}
-
-proc movx_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/6 movx_tests\n"
- gdb_expect {
- -re "
-.*movx \\(8,a2\\),d1.*
-.*movx \\(256,a2\\),d1.*
-.*movx \\(131071,a2\\),d1.*
-.*movx d1,\\(8,a2\\).*
-.*movx d1,\\(256,a2\\).*
-.*movx d1,\\(131071,a2\\).*
-.*$gdb_prompt $" { pass "movx tests" }
- -re "$gdb_prompt $" { fail "movx tests" }
- timeout { fail "(timeout) movx tests" }
- }
-}
-
-proc muldiv_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/3 muldiv_tests\n"
- gdb_expect {
- -re "
-.*mul d1,d2.*
-.*mulu d2,d3.*
-.*divu d3,d2.*
-.*$gdb_prompt $" { pass "muldiv tests" }
- -re "$gdb_prompt $" { fail "muldiv tests" }
- timeout { fail "(timeout) muldiv tests" }
- }
-}
-
-proc misc_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9 misc_tests\n"
- gdb_expect {
- -re "
-.*jmp 0x\[0-9a-f]+ <main>.*
-.*jmp 0x\[0-9a-f]+ <start>.*
-.*jmp \\(a2\\).*
-.*jsr 0x\[0-9a-f]+ <main>.*
-.*jsr 0x\[0-9a-f]+ <start>.*
-.*jsr \\(a2\\).*
-.*rts.*
-.*rti.*
-.*nop.*
-.*$gdb_prompt $" { pass "misc tests" }
- -re "$gdb_prompt $" { fail "misc tests" }
- timeout { fail "(timeout) misc tests" }
- }
-}
-
-proc shift_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/4i shift_tests\n"
- gdb_expect {
- -re "
-.*asr d2.*
-.*lsr d3.*
-.*ror d1.*
-.*rol d2.*
-.*$gdb_prompt $" { pass "shift tests" }
- -re "$gdb_prompt $" { fail "shift tests" }
- timeout { fail "(timeout) shift tests" }
- }
-}
-
-proc sub_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9i sub_tests\n"
- gdb_expect {
- -re "
-.*sub d1,d2.*
-.*sub d2,a3.*
-.*sub a3,d3.*
-.*sub a3,a2.*
-.*sub 32767,d2.*
-.*sub 131071,d2.*
-.*sub 32767,a2.*
-.*sub 131071,a2.*
-.*subc d1,d2.*
-.*$gdb_prompt $" { pass "sub tests" }
- -re "$gdb_prompt $" { fail "sub tests" }
- timeout { fail "(timeout) sub tests" }
- }
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-add_tests
-bcc_tests
-bccx_tests
-bit_tests
-cmp_tests
-extend_tests
-logical_tests
-mov_tests_1
-mov_tests_2
-mov_tests_3
-mov_tests_4
-movb_tests
-movbu_tests
-movx_tests
-muldiv_tests
-misc_tests
-shift_tests
-sub_tests
+# OBSOLETE
+# OBSOLETE # Copyright 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Jeff Law. (law@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if ![istarget "mn10200*-*-*"] {
+# OBSOLETE verbose "Tests ignored for all but mn10200 based targets."
+# OBSOLETE return
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE global exec_output
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE set testfile "mn10200"
+# OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.s
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}
+# OBSOLETE if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
+# OBSOLETE gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc add_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/12i add_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*add d1,d2.*
+# OBSOLETE .*add d2,a3.*
+# OBSOLETE .*add a2,d1.*
+# OBSOLETE .*add a3,a2.*
+# OBSOLETE .*add 16,d1.*
+# OBSOLETE .*add 256,d2.*
+# OBSOLETE .*add 131071,d3.*
+# OBSOLETE .*add 16,a1.*
+# OBSOLETE .*add 256,a2.*
+# OBSOLETE .*add 131071,a3.*
+# OBSOLETE .*addc d1,d2.*
+# OBSOLETE .*addnf 16,a2.*
+# OBSOLETE .*$gdb_prompt $" { pass "add tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "add tests" }
+# OBSOLETE timeout { fail "(timeout) add tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc bcc_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/15i bCC_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*beq 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bne 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bgt 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bge 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*ble 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*blt 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bhi 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bcc 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bls 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bcs 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bvc 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bvs 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bnc 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bns 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*bra 0x\[0-9a-f]+ <bCC_tests>.*
+# OBSOLETE .*$gdb_prompt $" { pass "bCC tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "bCC tests" }
+# OBSOLETE timeout { fail "(timeout) bCC tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc bccx_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/14i bCCx_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*beqx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bnex 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bgtx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bgex 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*blex 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bltx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bhix 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bccx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*blsx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bcsx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bvcx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bvsx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bncx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*bnsx 0x\[0-9a-f]+ <bCCx_tests>.*
+# OBSOLETE .*$gdb_prompt $" { pass "bCCx tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "bCCx tests" }
+# OBSOLETE timeout { fail "(timeout) bCCx tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc bit_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/4 bit_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*btst 64,d1.*
+# OBSOLETE .*btst 8192,d2.*
+# OBSOLETE .*bset d1,\\(a2\\).*
+# OBSOLETE .*bclr d1,\\(a2\\).*
+# OBSOLETE .*$gdb_prompt $" { pass "bit tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "bit tests" }
+# OBSOLETE timeout { fail "(timeout) bit tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc cmp_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/9i cmp_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*cmp d1,d2.*
+# OBSOLETE .*cmp d2,a3.*
+# OBSOLETE .*cmp a3,d3.*
+# OBSOLETE .*cmp a3,a2.*
+# OBSOLETE .*cmp 16,d3.*
+# OBSOLETE .*cmp 256,d2.*
+# OBSOLETE .*cmp 131071,d1.*
+# OBSOLETE .*cmp 256,a2.*
+# OBSOLETE .*cmp 131071,a1.*
+# OBSOLETE .*$gdb_prompt $" { pass "cmp tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "cmp tests" }
+# OBSOLETE timeout { fail "(timeout) cmp tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc extend_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/5i extend_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*ext d1.*
+# OBSOLETE .*extx d2.*
+# OBSOLETE .*extxu d3.*
+# OBSOLETE .*extxb d2.*
+# OBSOLETE .*extxbu d1.*
+# OBSOLETE .*$gdb_prompt $" { pass "extend tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "extend tests" }
+# OBSOLETE timeout { fail "(timeout) extend tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc logical_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/11i logical_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*and d1,d2.*
+# OBSOLETE .*and 127,d2.*
+# OBSOLETE .*and 32767,d3.*
+# OBSOLETE .*and 32767,psw.*
+# OBSOLETE .*or d1,d2.*
+# OBSOLETE .*or 127,d2.*
+# OBSOLETE .*or 32767,d3.*
+# OBSOLETE .*or 32767,psw.*
+# OBSOLETE .*xor d1,d2.*
+# OBSOLETE .*xor 32767,d3.*
+# OBSOLETE .*not d3.*
+# OBSOLETE .*$gdb_prompt $" { pass "logical tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "logical tests" }
+# OBSOLETE timeout { fail "(timeout) logical tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc mov_tests_1 { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/12i mov_tests_1\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*mov d1,a2.*
+# OBSOLETE .*mov a2,d1.*
+# OBSOLETE .*mov d1,d2.*
+# OBSOLETE .*mov a2,a1.*
+# OBSOLETE .*mov psw,d3.*
+# OBSOLETE .*mov d2,psw.*
+# OBSOLETE .*mov mdr,d1.*
+# OBSOLETE .*mov d2,mdr.*
+# OBSOLETE .*mov \\(a2\\),d1.*
+# OBSOLETE .*mov \\(8,a2\\),d1.*
+# OBSOLETE .*mov \\(256,a2\\),d1.*
+# OBSOLETE .*mov \\(131071,a2\\),d1.*
+# OBSOLETE .*$gdb_prompt $" { pass "mov1 tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "mov1 tests" }
+# OBSOLETE timeout { fail "(timeout) mov1 tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc mov_tests_2 { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/9 mov_tests_2\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*mov \\(d1,a1\\),d2.*
+# OBSOLETE .*mov \\(0x8000.*\\),d1.*
+# OBSOLETE .*mov \\(0x1ffff.*\\),d1.*
+# OBSOLETE .*mov \\(8,a2\\),a1.*
+# OBSOLETE .*mov \\(256,a2\\),a1.*
+# OBSOLETE .*mov \\(131071,a2\\),a1.*
+# OBSOLETE .*mov \\(d1,a1\\),a2.*
+# OBSOLETE .*mov \\(0x8000.*\\),a1.*
+# OBSOLETE .*mov \\(0x1ffff.*\\),a1.*
+# OBSOLETE .*$gdb_prompt $" { pass "mov2 tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "mov2 tests" }
+# OBSOLETE timeout { fail "(timeout) mov2 tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc mov_tests_3 { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/10 mov_tests_3\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*mov d1,\\(a2\\).*
+# OBSOLETE .*mov d1,\\(32,a2\\).*
+# OBSOLETE .*mov d1,\\(256,a2\\).*
+# OBSOLETE .*mov d1,\\(131071,a2\\).*
+# OBSOLETE .*mov d1,\\(d2,a2\\).*
+# OBSOLETE .*mov d1,\\(0x80.*\\).*
+# OBSOLETE .*mov d1,\\(0x1ffff.*\\).*
+# OBSOLETE .*mov a1,\\(32,a2\\).*
+# OBSOLETE .*mov a1,\\(256,a2\\).*
+# OBSOLETE .*mov a1,\\(131071,a2\\).*
+# OBSOLETE .*$gdb_prompt $" { pass "mov3 tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "mov3 tests" }
+# OBSOLETE timeout { fail "(timeout) mov3 tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc mov_tests_4 { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/8 mov_tests_4\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*mov a1,\\(d2,a2\\).*
+# OBSOLETE .*mov a1,\\(0x80.*\\).*
+# OBSOLETE .*mov a1,\\(0x1ffff.*\\).*
+# OBSOLETE .*mov 8,d1.*
+# OBSOLETE .*mov 256,d1.*
+# OBSOLETE .*mov 131071,d1.*
+# OBSOLETE .*mov 256,a1.*
+# OBSOLETE .*mov 131071,a1.*
+# OBSOLETE .*$gdb_prompt $" { pass "mov4 tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "mov4 tests" }
+# OBSOLETE timeout { fail "(timeout) mov4 tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc movb_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/12 movb_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*movb \\(8,a2\\),d1.*
+# OBSOLETE .*movb \\(256,a2\\),d1.*
+# OBSOLETE .*movb \\(131071,a2\\),d1.*
+# OBSOLETE .*movb \\(d2,a2\\),d3.*
+# OBSOLETE .*movb \\(0x1ffff.*\\),d2.*
+# OBSOLETE .*movb d1,\\(a2\\).*
+# OBSOLETE .*movb d1,\\(8,a2\\).*
+# OBSOLETE .*movb d1,\\(256,a2\\).*
+# OBSOLETE .*movb d1,\\(131071,a2\\).*
+# OBSOLETE .*movb d1,\\(d2,a2\\).*
+# OBSOLETE .*movb d1,\\(0x100.*\\).*
+# OBSOLETE .*movb d1,\\(0x1ffff.*\\).*
+# OBSOLETE .*$gdb_prompt $" { pass "movb tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "movb tests" }
+# OBSOLETE timeout { fail "(timeout) movb tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc movbu_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/7 movbu_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*movbu \\(a2\\),d1.*
+# OBSOLETE .*movbu \\(8,a2\\),d1.*
+# OBSOLETE .*movbu \\(256,a2\\),d1.*
+# OBSOLETE .*movbu \\(131071,a2\\),d1.*
+# OBSOLETE .*movbu \\(d1,a1\\),d2.*
+# OBSOLETE .*movbu \\(0x8000.*\\),d1.*
+# OBSOLETE .*movbu \\(0x1ffff.*\\),d1.*
+# OBSOLETE .*$gdb_prompt $" { pass "movbu tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "movbu tests" }
+# OBSOLETE timeout { fail "(timeout) movbu tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc movx_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/6 movx_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*movx \\(8,a2\\),d1.*
+# OBSOLETE .*movx \\(256,a2\\),d1.*
+# OBSOLETE .*movx \\(131071,a2\\),d1.*
+# OBSOLETE .*movx d1,\\(8,a2\\).*
+# OBSOLETE .*movx d1,\\(256,a2\\).*
+# OBSOLETE .*movx d1,\\(131071,a2\\).*
+# OBSOLETE .*$gdb_prompt $" { pass "movx tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "movx tests" }
+# OBSOLETE timeout { fail "(timeout) movx tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc muldiv_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/3 muldiv_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*mul d1,d2.*
+# OBSOLETE .*mulu d2,d3.*
+# OBSOLETE .*divu d3,d2.*
+# OBSOLETE .*$gdb_prompt $" { pass "muldiv tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "muldiv tests" }
+# OBSOLETE timeout { fail "(timeout) muldiv tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc misc_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/9 misc_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*jmp 0x\[0-9a-f]+ <main>.*
+# OBSOLETE .*jmp 0x\[0-9a-f]+ <start>.*
+# OBSOLETE .*jmp \\(a2\\).*
+# OBSOLETE .*jsr 0x\[0-9a-f]+ <main>.*
+# OBSOLETE .*jsr 0x\[0-9a-f]+ <start>.*
+# OBSOLETE .*jsr \\(a2\\).*
+# OBSOLETE .*rts.*
+# OBSOLETE .*rti.*
+# OBSOLETE .*nop.*
+# OBSOLETE .*$gdb_prompt $" { pass "misc tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "misc tests" }
+# OBSOLETE timeout { fail "(timeout) misc tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc shift_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/4i shift_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*asr d2.*
+# OBSOLETE .*lsr d3.*
+# OBSOLETE .*ror d1.*
+# OBSOLETE .*rol d2.*
+# OBSOLETE .*$gdb_prompt $" { pass "shift tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "shift tests" }
+# OBSOLETE timeout { fail "(timeout) shift tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc sub_tests { } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global hex
+# OBSOLETE global decimal
+# OBSOLETE
+# OBSOLETE send_gdb "x/9i sub_tests\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re "
+# OBSOLETE .*sub d1,d2.*
+# OBSOLETE .*sub d2,a3.*
+# OBSOLETE .*sub a3,d3.*
+# OBSOLETE .*sub a3,a2.*
+# OBSOLETE .*sub 32767,d2.*
+# OBSOLETE .*sub 131071,d2.*
+# OBSOLETE .*sub 32767,a2.*
+# OBSOLETE .*sub 131071,a2.*
+# OBSOLETE .*subc d1,d2.*
+# OBSOLETE .*$gdb_prompt $" { pass "sub tests" }
+# OBSOLETE -re "$gdb_prompt $" { fail "sub tests" }
+# OBSOLETE timeout { fail "(timeout) sub tests" }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE add_tests
+# OBSOLETE bcc_tests
+# OBSOLETE bccx_tests
+# OBSOLETE bit_tests
+# OBSOLETE cmp_tests
+# OBSOLETE extend_tests
+# OBSOLETE logical_tests
+# OBSOLETE mov_tests_1
+# OBSOLETE mov_tests_2
+# OBSOLETE mov_tests_3
+# OBSOLETE mov_tests_4
+# OBSOLETE movb_tests
+# OBSOLETE movbu_tests
+# OBSOLETE movx_tests
+# OBSOLETE muldiv_tests
+# OBSOLETE misc_tests
+# OBSOLETE shift_tests
+# OBSOLETE sub_tests
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index 2e2a82e3c85..d08946276c9 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-23 Stephane Carrez <stcarrez@nerim.fr>
+
+ * mi-syn-frame.exp: Don't run this test when gdb,nosignals is set.
+
2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
* mi-basics.exp: Change tests for -environment-directory. Also add
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
new file mode 100644
index 00000000000..62501e03a19
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -0,0 +1,208 @@
+# Copyright 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file tests that GDB's console can be accessed via the MI.
+# Specifically, we are testing the "interpreter-exec" command and that
+# the commands that are executed via this command 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=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+ continue
+}
+
+set testfile "basics"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+mi_gdb_reinitialize_dir $srcdir/$subdir
+
+mi_gdb_test "-interpreter-exec" \
+ {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ "-interpreter-exec with no arguments"
+
+mi_gdb_test "-interpreter-exec console" \
+ {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ "-interpreter-exec with one argument"
+
+mi_gdb_test "-interpreter-exec bogus command" \
+ {\^error,msg="mi_cmd_interpreter_exec: could not find interpreter \\\"bogus\\\""} \
+ "-interpreter-exec with bogus interpreter"
+
+set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}
+mi_gdb_test "-interpreter-exec console bogus" \
+ "&\\\"$msg\\\\n\\\".*\\^error,msg=\\\"$msg\\\".*" \
+ "-interpreter-exec console bogus"
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
+# {(=.*)+\^done} \
+# "-interpreter-exec console \"file \$binfile\""
+mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
+ {\^done} \
+ "-interpreter-exec console \"file \$binfile\""
+
+mi_run_to_main
+
+mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
+ {\^done} \
+ "-interpreter-exec console \"set args foobar\""
+
+mi_gdb_test "-interpreter-exec console \"show args\"" \
+ {\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \
+ "-interpreter-exec console \"show args\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"break callee4\"" \
+# {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \
+# "-interpreter-exec console \"break callee4\""
+mi_gdb_test "-interpreter-exec console \"break callee4\"" \
+ {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \
+ "-interpreter-exec console \"break callee4\""
+
+mi_gdb_test "-interpreter-exec console \"info break\"" \
+ {\~"Num[ \t]*Type[ \t]*Disp[ \t]*Enb[ \t]*Address[ \t]*What\\n".*~"2[ \t]*breakpoint[ \t]*keep[ \t]*y[ \t]*0x[0-9A-Fa-f]+[ \t]*in callee4 at .*basics.c:[0-9]+\\n".*\^done} \
+ "-interpreter-exec console \"info break\""
+
+mi_gdb_test "-interpreter-exec console \"set listsize 1\"" \
+ {\^done} \
+ "-interpreter-exec console \"set listsize 1\""
+
+mi_gdb_test "-interpreter-exec console \"list\"" \
+ {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \
+ "-interpreter-exec console \"list\""
+
+# # NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \
+# "-interpreter-exec console \"continue to callee4\""
+send_gdb "999-exec-continue\n"
+gdb_expect {
+ -re "999\\^running\[\r\n\]+$mi_gdb_prompt.*999\\*stopped,reason=.breakpoint-hit.*$mi_gdb_prompt$" {
+ pass "continue to callee4"
+ }
+ timeout {
+ fail "continue to callee4 (timeout)"
+ }
+}
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+# {.*=breakpoint-delete,number=\"2\".*\^done} \
+# "-interpreter-exec console \"delete 2\""
+mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+ {100\^done} \
+ "-interpreter-exec console \"delete 2\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "200-interpreter-exec console \"up\"" \
+# {.*=selected-frame-level-changed,level="1".*\^done} \
+# "-interpreter-exec console \"up\""
+mi_gdb_test "200-interpreter-exec console \"up\"" \
+ {200\^done} \
+ "-interpreter-exec console \"up\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "300-interpreter-exec console \"down\"" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-interpreter-exec console \"down\""
+mi_gdb_test "300-interpreter-exec console \"down\"" \
+ {300\^done} \
+ "-interpreter-exec console \"down\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"frame 2\"" \
+# {.*=selected-frame-level-changed,level="2".*\^done} \
+# "-interpreter-exec console \"frame 2\""
+mi_gdb_test "400-interpreter-exec console \"frame 2\"" \
+ {400\^done} \
+ "-interpreter-exec console \"frame 2\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-stack-select-frame 0" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-stack-select-frame 0"
+mi_gdb_test "500-stack-select-frame 0" \
+ {500\^done} \
+ "-stack-select-frame 0"
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-break-insert -t basics.c:35" \
+# {.*=breakpoint-create,number="3".*\^done} \
+# "-break-insert -t basics.c:35"
+mi_gdb_test "600-break-insert -t basics.c:35" \
+ {600\^done,bkpt=.number="3",type="breakpoint".*\}} \
+ "-break-insert -t basics.c:35"
+
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped.*,file=".*basics.c",line="35"\}} \
+# "-exec-continue to line 35"
+send_gdb "700-exec-continue\n"
+gdb_expect {
+ -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" {
+ pass "-exec-continue to line 35"
+ }
+ timeout {
+ fail "-exec-continue to line 35"
+ }
+}
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-next" \
+# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
+# "-exec-next to line 37"
+send_gdb "800-exec-next\n"
+gdb_expect {
+ -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" {
+ pass "-exec-next to line 37"
+ }
+ timeout {
+ fail "-exec-next to line 37"
+ }
+}
+
+mi_gdb_test "-interpreter-exec console \"list\"" \
+ {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \
+ "-interpreter-exec console \"list\" at basics.c:37"
+
+mi_gdb_test "-interpreter-exec console \"help set args\"" \
+ {\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \
+ "-interpreter-exec console \"help set args\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \
+# {.*=target-changed.*\^done} \
+# "-interpreter-exec console \"set \$pc=0x0\""
+mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \
+ {888\^done} \
+ "-interpreter-exec console \"set \$pc=0x0\""
+
+#mi_gdb_test "-interpreter-exec console \"\"" \
+ {} \
+ "-interpreter-exec console \"\""
+
+mi_gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.c b/gdb/testsuite/gdb.mi/mi-syn-frame.c
index 83d2d46876e..580b5342716 100644
--- a/gdb/testsuite/gdb.mi/mi-syn-frame.c
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.c
@@ -43,11 +43,16 @@ handler (int sig)
subroutine (sig);
}
+/* The first statement in subroutine () is a place for a breakpoint.
+ Without it, the breakpoint is put on the while comparison and will
+ be hit at each iteration. */
+
void
subroutine (int in)
{
- while (in < 100)
- in++;
+ int count = in;
+ while (count < 100)
+ count++;
}
void
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
index 49f97721e80..44ce8452fba 100644
--- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +20,11 @@
# 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=mi"
diff --git a/gdb/testsuite/gdb.trace/Makefile.in b/gdb/testsuite/gdb.trace/Makefile.in
index b416c3b8d16..89bd1851b77 100644
--- a/gdb/testsuite/gdb.trace/Makefile.in
+++ b/gdb/testsuite/gdb.trace/Makefile.in
@@ -8,7 +8,7 @@ all info install-info dvi install uninstall installcheck check:
clean mostlyclean:
-rm -f actions circ collection limits
- -rm -f *.o *.diff *~ *.bad core sh3 hppa mn10200 mn10300
+ -rm -f *.o *.diff *~ *.bad core sh3 hppa mn10300
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index dca41dc9134..d2b6fbdb8c6 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1004,6 +1004,15 @@ proc skip_cplus_tests {} {
if { [istarget "h8300-*-*"] } {
return 1
}
+
+ # The C++ IO streams are too large for HC11/HC12 and are thus not
+ # available. The gdb C++ tests use them and don't compile.
+ if { [istarget "m6811-*-*"] } {
+ return 1
+ }
+ if { [istarget "m6812-*-*"] } {
+ return 1
+ }
return 0
}