This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
gdb.c++ testsuite patch
- To: gdb-patches@sourceware.cygnus.com
- Subject: gdb.c++ testsuite patch
- From: Jimmy Guo <guo@cup.hp.com>
- Date: Thu, 22 Jul 1999 18:00:43 -0700 (PDT)
This patch contains merged gdb.c++ testsuite.
File renames / moves (a tar file of gdb.c++ has been ftp'd over as
ftp.cygnus.com:/incoming/hp_gdb.cxx.tar):
Old New
--- ---
gdb.hp/ambiguous.cc ambiguous.cc
gdb.hp/ambiguous.exp ambiguous.exp
gdb.hp/ctti.exp ctti.exp
gdb.hp/ctti-add.cc cttiadd.cc
gdb.hp/ctti-add1.cc cttiadd1.cc
gdb.hp/ctti-add2.cc cttiadd2.cc
gdb.hp/ctti-add3.cc cttiadd3.cc
ref-types.cc ref-typ.cc
ref-types.exp ref-typ.exp
ref-types2.cc ref-typ2.cc
ref-types2.exp ref-typ2.exp
- Jimmy Guo, guo@cup.hp.com
/opt/gnu/bin/diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++ gdb/testsuite/gdb.c++
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/Makefile.in gdb/testsuite/gdb.c++/Makefile.in
*** ../gdb-19990719/gdb/testsuite/gdb.c++/Makefile.in Tue Jul 6 13:21:50 1999
--- gdb/testsuite/gdb.c++/Makefile.in Thu Jul 22 17:49:19 1999
***************
*** 1,17 ****
VPATH = @srcdir@
srcdir = @srcdir@
! PROGS = annota2 anon-union compiler cplusfuncs derivation inherit local \
! member-ptr method misc \
! overload ovldbreak ref-types ref-types2 templates userdef virtfunc
all:
@echo "Nothing to be done for all..."
! #### host, target, and site specific Makefile frags come in here.
clean mostlyclean:
! -rm -f *.ci *.o ${OBJS} ${PROGS} *~ core
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
--- 1,24 ----
VPATH = @srcdir@
srcdir = @srcdir@
! EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \
! derivation inherit local member-ptr method misc \
! overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc
all:
@echo "Nothing to be done for all..."
! info:
! install-info:
! dvi:
! install:
! uninstall: force
! installcheck:
! check:
clean mostlyclean:
! -rm -f *~ *.o *.ci
! -rm -f core ${EXECUTABLES}
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ambiguous.cc gdb/testsuite/gdb.c++/ambiguous.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ambiguous.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ambiguous.cc Thu Jul 22 17:49:24 1999
***************
*** 0 ****
--- 1,110 ----
+
+ void marker1()
+ {
+ return;
+ }
+
+ class A1 {
+ public:
+ int x;
+ int y;
+ };
+
+ class A2 {
+ public:
+ int x;
+ int y;
+ };
+
+ class A3 {
+ public:
+ int x;
+ int y;
+ };
+
+ class X : public A1, public A2 {
+ public:
+ int z;
+ };
+
+ class L : public A1 {
+ public:
+ int z;
+ };
+
+ class LV : public virtual A1 {
+ public:
+ int z;
+ };
+
+ class M : public A2 {
+ public:
+ int w;
+ };
+
+ class N : public L, public M {
+ public:
+ int r;
+ };
+
+ class K : public A1 {
+ public:
+ int i;
+ };
+
+ class KV : public virtual A1 {
+ public:
+ int i;
+ };
+
+ class J : public K, public L {
+ public:
+ int j;
+ };
+
+ class JV : public KV, public LV {
+ public:
+ int jv;
+ };
+
+ class JVA1 : public KV, public LV, public A1 {
+ public:
+ int jva1;
+ };
+
+ class JVA2 : public KV, public LV, public A2 {
+ public:
+ int jva2;
+ };
+
+ class JVA1V : public KV, public LV, public virtual A1 {
+ public:
+ int jva1v;
+ };
+
+ int main()
+ {
+ A1 a1;
+ A2 a2;
+ A3 a3;
+ X x;
+ L l;
+ M m;
+ N n;
+ K k;
+ J j;
+ JV jv;
+ JVA1 jva1;
+ JVA2 jva2;
+ JVA1V jva1v;
+
+ int i;
+
+ i += k.i + m.w + a1.x + a2.x + a3.x + x.z + l.z + n.r + j.j;
+
+ marker1();
+
+ }
+
+
+
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ambiguous.exp gdb/testsuite/gdb.c++/ambiguous.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ambiguous.exp Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ambiguous.exp Thu Jul 22 17:49:24 1999
***************
*** 0 ****
--- 1,235 ----
+ # Copyright (C) 1998 Free Software Foundation, Inc.
+
+ # This program is free software; you can 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 is part of the gdb testsuite
+
+ # tests relating to ambiguous class members
+ # Written by Satish Pai <pai@apollo.hp.com> 1997-07-28
+
+ # This file is part of the gdb testsuite
+
+ if $tracelevel then {
+ strace $tracelevel
+ }
+
+ #
+ # test running programs
+ #
+
+ set prms_id 0
+ set bug_id 0
+
+ set testfile "ambiguous"
+ set srcfile ${testfile}.cc
+ set binfile ${objdir}/${subdir}/${testfile}
+
+ if [get_compiler_info ${binfile} "c++"] {
+ return -1;
+ }
+
+ if { $gcc_compiled } then { continue }
+
+ 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."
+ }
+
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+ }
+
+ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
+ send_gdb "cont\n"
+ gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { pass "up from marker1" }
+ timeout { fail "up from marker1" }
+ }
+ }
+ -re "$gdb_prompt $" { fail "continue to marker1" }
+ timeout { fail "(timeout) continue to marker1" }
+ }
+
+ # print out various class objects' members. The values aren't
+ # important, just check that the warning is emitted at the
+ # right times.
+
+ # X is derived from A1 and A2; both A1 and A2 have a member 'x'
+ send_gdb "print x.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous; using X::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print x.x"
+ }
+ -re "warning: x ambiguous; using X::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print x.x"
+ }
+ -re ".*$gdb_prompt $" { fail "print x.x" }
+ timeout { fail "(timeout) print x.x" }
+ }
+
+
+ # N is derived from A1 and A2, but not immediately -- two steps
+ # up in the hierarchy. Both A1 and A2 have a member 'x'.
+ send_gdb "print n.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous; using N::M::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print n.x"
+ }
+ -re "warning: x ambiguous; using N::L::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print n.x"
+ }
+ -re ".*$gdb_prompt $" { fail "print n.x" }
+ timeout { fail "(timeout) print n.x" }
+ }
+
+ # J is derived from A1 twice. A1 has a member x.
+ send_gdb "print j.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous; using J::L::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print j.x"
+ }
+ -re "warning: x ambiguous; using J::K::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print j.x"
+ }
+ -re ".*$gdb_prompt $" { fail "print j.x" }
+ timeout { fail "(timeout) print j.x" }
+ }
+
+ # JV is derived from A1 but A1 is a virtual base. Should not
+ # report an ambiguity in this case.
+ send_gdb "print jv.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ fail "print jv.x (ambiguity reported)"
+ }
+ -re "\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" { pass "print jv.x" }
+ -re ".*$gdb_prompt $" { fail "print jv.x (??)" }
+ timeout { fail "(timeout) print jv.x" }
+ }
+
+ # JVA1 is derived from A1; A1 occurs as a virtual base in two
+ # ancestors, and as a non-virtual immediate base. Ambiguity must
+ # be reported.
+ send_gdb "print jva1.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous; using JVA1::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print jva1.x"
+ }
+ -re "warning: x ambiguous; using JVA1::KV::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print jva1.x"
+ }
+ -re ".*$gdb_prompt $" { fail "print jva1.x" }
+ timeout { fail "(timeout) print jva1.x" }
+ }
+
+ # JVA2 is derived from A1 & A2; A1 occurs as a virtual base in two
+ # ancestors, and A2 is a non-virtual immediate base. Ambiguity must
+ # be reported as A1 and A2 both have a member 'x'.
+ send_gdb "print jva2.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous; using JVA2::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print jva2.x"
+ }
+ -re "warning: x ambiguous; using JVA2::KV::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ pass "print jva2.x"
+ }
+ -re ".*$gdb_prompt $" { fail "print jva2.x" }
+ timeout { fail "(timeout) print jva2.x" }
+ }
+
+ # JVA1V is derived from A1; A1 occurs as a virtual base in two
+ # ancestors, and also as a virtual immediate base. Ambiguity must
+ # not be reported.
+ send_gdb "print jva1v.x\n"
+ gdb_expect {
+ -re "warning: x ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
+ fail "print jva1v.x (ambiguity reported)"
+ }
+ -re "\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" { pass "print jva1v.x" }
+ -re ".*$gdb_prompt $" { fail "print jva1v.x (??)" }
+ timeout { fail "(timeout) print jva1v.x" }
+ }
+
+ # Now check for ambiguous bases.
+
+ # J is derived from A1 twice; report ambiguity if a J is
+ # cast to an A1.
+ send_gdb "print (A1)j\n"
+ gdb_expect {
+ -re "warning: A1 ambiguous; using J::L::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ pass "print (A1)j"
+ }
+ -re "warning: A1 ambiguous; using J::K::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ pass "print (A1)j"
+ }
+ -re ".*$gdb_prompt $" { fail "print (A1)j" }
+ timeout { fail "(timeout) print (A1)j" }
+ }
+
+ # JV is derived from A1 twice, but A1 is a virtual base; should
+ # not report ambiguity when a JV is cast to an A1.
+ send_gdb "print (A1)jv\n"
+ gdb_expect {
+ -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ fail "print (A1)jv (ambiguity reported)"
+ }
+ -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jv" }
+ -re ".*$gdb_prompt $" { fail "print (A1)jv (??)" }
+ timeout { fail "(timeout) print (A1)jv" }
+ }
+
+ # JVA1 is derived from A1; A1 is a virtual base and also a
+ # non-virtual base. Must report ambiguity if a JVA1 is cast to an A1.
+ send_gdb "print (A1)jva1\n"
+ gdb_expect {
+ -re "warning: A1 ambiguous; using JVA1::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ pass "print (A1)jva1"
+ }
+ -re "warning: A1 ambiguous; using JVA1::KV::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ pass "print (A1)jva1"
+ }
+ -re ".*$gdb_prompt $" { fail "print (A1)jva1" }
+ timeout { fail "(timeout) print (A1)jva1" }
+ }
+
+ # JVA1V is derived from A1; A1 is a virtual base indirectly
+ # and also directly; must not report ambiguity when a JVA1V is cast to an A1.
+ send_gdb "print (A1)jva1v\n"
+ gdb_expect {
+ -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
+ fail "print (A1)jva1v (ambiguity reported)"
+ }
+ -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jva1v"
+ }
+ -re ".*$gdb_prompt $" { fail "print (A1)jva1v (??)" }
+ timeout { fail "(timeout) print (A1)jva1v" }
+ }
+
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/anon-union.cc gdb/testsuite/gdb.c++/anon-union.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/anon-union.cc Tue Jan 5 16:11:17 1999
--- gdb/testsuite/gdb.c++/anon-union.cc Thu Jul 22 17:49:24 1999
***************
*** 4,16 ****
int zero;
unsigned int one;
} num1;
!
! union {
! int pebble;
! struct {
int rock;
unsigned int rock2;
! } x;
union {
int qux;
unsigned int mux;
--- 4,16 ----
int zero;
unsigned int one;
} num1;
! struct X {
int rock;
unsigned int rock2;
! };
! union {
! int pebble;
! X x;
union {
int qux;
unsigned int mux;
***************
*** 32,53 ****
unsigned int y;
};
- Foo foo;
- Bar bar;
int main()
{
foo.paper = 33;
foo.pebble = 44;
foo.mux = 55;
! bar.x = 33;
! union
! {
int z;
unsigned int w;
! };
w = 45;
--- 32,54 ----
unsigned int y;
};
int main()
{
+ Foo foo = {0, 0};
+
foo.paper = 33;
foo.pebble = 44;
foo.mux = 55;
! Bar bar = {0};
! union {
int z;
unsigned int w;
! }; w = 0;
!
! bar.x = 33;
w = 45;
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/anon-union.exp gdb/testsuite/gdb.c++/anon-union.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/anon-union.exp Tue Jan 5 16:11:17 1999
--- gdb/testsuite/gdb.c++/anon-union.exp Thu Jul 22 17:49:24 1999
***************
*** 76,81 ****
--- 76,91 ----
# NOTE: Add -- ptype foo.x, etc. when things are working
+ #Initialize foo
+ send_gdb "next\n"
+ gdb_expect {
+ -re "40\[ \t\]*foo.paper = 33;\r\n$gdb_prompt $" {
+ pass "next 1"
+ }
+ -re ".*$gdb_prompt $" { fail "next 1" }
+ timeout { fail "(timeout) next 1" }
+ }
+
# Print out the big anon union.
send_gdb "print foo\n"
gdb_expect {
***************
*** 245,254 ****
}
! # Step over next two assignments
! send_gdb "next 2\n"
gdb_expect {
! -re "52\[ \t\]*w = 45;\r\n$gdb_prompt $" {
pass "next 3"
}
-re ".*$gdb_prompt $" { fail "next 3" }
--- 255,264 ----
}
! # Step over next four assignments
! send_gdb "next 4\n"
gdb_expect {
! -re "53\[ \t\]*w = 45;\r\n$gdb_prompt $" {
pass "next 3"
}
-re ".*$gdb_prompt $" { fail "next 3" }
***************
*** 257,286 ****
# Tests for anon unions that are not members of a class or struct
! # w is not yet initialized; it contains garbage
! #send_gdb "print w\n"
! #gdb_expect {
! # -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
! # pass "print w 1"
! # }
! # -re ".*$gdb_prompt $" { fail "print w 1" }
! # timeout { fail "(timeout) print w 1" }
! #}
! #
! # z is not yet initialized; it contains garbage
! #send_gdb "print z\n"
! #gdb_expect {
! # -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
! # pass "print z 1"
! # }
! # -re ".*$gdb_prompt $" { fail "print z 1" }
! # timeout { fail "(timeout) print z 1" }
! #}
# Step over next assignment to w
send_gdb "next\n"
gdb_expect {
! -re "54\[ \t\]*\}\r\n$gdb_prompt $" {
pass "next 4"
}
-re ".*$gdb_prompt $" { fail "next 4" }
--- 267,294 ----
# Tests for anon unions that are not members of a class or struct
! send_gdb "print w\n"
! gdb_expect {
! -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
! pass "print w 1"
! }
! -re ".*$gdb_prompt $" { fail "print w 1" }
! timeout { fail "(timeout) print w 1" }
! }
!
! send_gdb "print z\n"
! gdb_expect {
! -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
! pass "print z 1"
! }
! -re ".*$gdb_prompt $" { fail "print z 1" }
! timeout { fail "(timeout) print z 1" }
! }
# Step over next assignment to w
send_gdb "next\n"
gdb_expect {
! -re "55\[ \t\]*\}\r\n$gdb_prompt $" {
pass "next 4"
}
-re ".*$gdb_prompt $" { fail "next 4" }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/classes.exp gdb/testsuite/gdb.c++/classes.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/classes.exp Thu Mar 25 15:35:18 1999
--- gdb/testsuite/gdb.c++/classes.exp Thu Jul 22 17:49:19 1999
***************
*** 42,54 ****
return -1
}
- # if we are on HPUX and we are not compiled with gcc, then skip these tests.
-
- if [istarget hppa*-*-hpux*] {
- if {!$gcc_compiled} {
- continue
- }
- }
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."
--- 42,47 ----
***************
*** 142,147 ****
--- 135,143 ----
-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)"
}
+ -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)"
***************
*** 203,208 ****
--- 199,207 ----
-re "type = class explicit_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
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)"
+ }
-re "type = struct explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
setup_xfail "*-*-*"
fail "ptype class explicit_private_class"
***************
*** 340,345 ****
--- 339,347 ----
setup_xfail "*-*-*"
fail "ptype class vB (FIXME: non-portable virtual table constructs)"
}
+ -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype class vB (aCC)"
+ }
-re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vb;${ws}int vx;((${ws}vB & operator=\\(vB const &\\);)|(${ws}vB\\(int, vB const &\\);)|(${ws}vB\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
setup_xfail "*-*-*"
fail "ptype class vB (FIXME) (obsolescent gcc or gdb)"
***************
*** 364,369 ****
--- 366,374 ----
setup_xfail "*-*-*"
fail "ptype class vC (FIXME: non-portable virtual table constructs)"
}
+ -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype class vC (aCC)"
+ }
-re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vc;${ws}int vx;((${ws}vC & operator=\\(vC const &\\);)|(${ws}vC\\(int, vC const &\\);)|(${ws}vC\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
setup_xfail "*-*-*"
fail "ptype class vC (FIXME) (obsolescent gcc or gdb)"
***************
*** 388,393 ****
--- 393,401 ----
setup_xfail "*-*-*"
fail "ptype class vD (FIXME: non-portable virtual table constructs)"
}
+ -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype class vD (aCC)"
+ }
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*_vb.vC;${ws}vB \\*_vb.vB;${ws}public:${ws}int vd;${ws}int vx;((${ws}vD & operator=\\(vD const &\\);)|(${ws}vD\\(int, vD const &\\);)|(${ws}vD\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
setup_xfail "*-*-*"
fail "ptype class vD (FIXME) (obsolescent gcc or gdb)"
***************
*** 412,417 ****
--- 420,428 ----
setup_xfail "*-*-*"
fail "ptype class vE (FIXME: non-portable virtual table constructs)"
}
+ -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype class vE (aCC)"
+ }
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*_vb.vD;${ws}public:${ws}int ve;${ws}int vx;((${ws}vE & operator=\\(vE const &\\);)|(${ws}vE\\(int, vE const &\\);)|(${ws}vE\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
setup_xfail "*-*-*"
fail "ptype class vE (FIXME) (obsolescent gcc or gdb)"
***************
*** 446,451 ****
--- 457,465 ----
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 $" {
+ pass "ptype class Foo(aCC)"
+ }
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}int operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype class Foo"
}
***************
*** 584,590 ****
timeout { fail "print (int)&Bar::y == 2*sizeof(int) (timeout)" ; return }
}
! send_gdb "next\n"
setup_xfail "*-*-*"
gdb_expect {
-re "$decimal\[ \t\]+inheritance3 \[)(\]+;$nl$gdb_prompt $" {}
--- 598,604 ----
timeout { fail "print (int)&Bar::y == 2*sizeof(int) (timeout)" ; return }
}
! send_gdb "next 2\n"
setup_xfail "*-*-*"
gdb_expect {
-re "$decimal\[ \t\]+inheritance3 \[)(\]+;$nl$gdb_prompt $" {}
***************
*** 774,788 ****
# set a breakpoint and go there
! send_gdb "break 503\n"
gdb_expect {
! -re "Breakpoint \[0-9\] at.*$gdb_prompt $" { pass "set break 503" }
! -re "$gdb_prompt $" { fail "set break 503" }
! timeout { fail "(timeout) set break 503" }
}
send_gdb "continue\n"
gdb_expect {
! -re "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, main....at.*misc\\.cc:503\r\n503.*\r\n$gdb_prompt $" { pass "continue" }
-re "$gdb_prompt $" { fail "continue" }
timeout { fail "(timeout) continue" }
}
--- 788,802 ----
# set a breakpoint and go there
! send_gdb "break 516\n"
gdb_expect {
! -re "Breakpoint \[0-9\] at.*$gdb_prompt $" { pass "set break 516" }
! -re "$gdb_prompt $" { fail "set break 516" }
! timeout { fail "(timeout) set break 516" }
}
send_gdb "continue\n"
gdb_expect {
! -re "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, main....at.*misc\\.cc:516\r\n516.*\r\n$gdb_prompt $" { pass "continue" }
-re "$gdb_prompt $" { fail "continue" }
timeout { fail "(timeout) continue" }
}
***************
*** 829,841 ****
}
# ptype on the object
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 "$gdb_prompt $" { fail "ptype obj_with_enum" }
timeout { fail "(timeout) ptype obj_with_enum" }
}
send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
gdb_expect {
-re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
--- 843,859 ----
}
# ptype on the object
+ # g++ is putting out the wrong debug info. This works with aCC
+ if {!$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
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 "$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 "hppa*-*-*"}
send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
gdb_expect {
-re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cplusfuncs.cc gdb/testsuite/gdb.c++/cplusfuncs.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cplusfuncs.cc Wed Jun 2 09:28:26 1999
--- gdb/testsuite/gdb.c++/cplusfuncs.cc Thu Jul 22 17:49:20 1999
***************
*** 36,42 ****
void operator || (foo&);
void operator ~ (void);
void operator -- (int);
! void operator -> (void);
void operator -= (foo&);
void operator /= (foo&);
void operator <<= (foo&);
--- 36,42 ----
void operator || (foo&);
void operator ~ (void);
void operator -- (int);
! foo* operator -> (void);
void operator -= (foo&);
void operator /= (foo&);
void operator <<= (foo&);
***************
*** 63,69 ****
};
#endif
! main () {
#ifdef usestubs
set_debug_traps();
breakpoint();
--- 63,69 ----
};
#endif
! int main () {
#ifdef usestubs
set_debug_traps();
breakpoint();
***************
*** 105,111 ****
void foo::operator || (foo& afoo) { afoo.ifoo = 0; }
void foo::operator ~ (void) {}
void foo::operator -- (int ival) { ival = 0; }
! void foo::operator -> (void) {}
void foo::operator -= (foo& afoo) { afoo.ifoo = 0; }
void foo::operator /= (foo& afoo) { afoo.ifoo = 0; }
void foo::operator <<= (foo& afoo) { afoo.ifoo = 0; }
--- 105,111 ----
void foo::operator || (foo& afoo) { afoo.ifoo = 0; }
void foo::operator ~ (void) {}
void foo::operator -- (int ival) { ival = 0; }
! foo* foo::operator -> (void) {return this;}
void foo::operator -= (foo& afoo) { afoo.ifoo = 0; }
void foo::operator /= (foo& afoo) { afoo.ifoo = 0; }
void foo::operator <<= (foo& afoo) { afoo.ifoo = 0; }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cplusfuncs.exp gdb/testsuite/gdb.c++/cplusfuncs.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cplusfuncs.exp Mon Jan 4 14:14:09 1999
--- gdb/testsuite/gdb.c++/cplusfuncs.exp Thu Jul 22 17:49:20 1999
***************
*** 34,39 ****
--- 34,43 ----
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
+ if {[get_compiler_info $binfile "c++"] == -1} {
+ return -1
+ }
+
#
# Cause gdb to lookup a specific C++ function and print the demangled
# form.
***************
*** 44,50 ****
send_gdb "info function $regex\n"
gdb_expect {
! -re "File .*:\r\n$demangled\r\n$gdb_prompt $" {
pass "info function for \"$regex\""
}
-re ".*$gdb_prompt $" {
--- 48,57 ----
send_gdb "info function $regex\n"
gdb_expect {
! -re "File .*:\r\n$demangled\r\n.*$gdb_prompt $" {
! pass "info function for \"$regex\""
! }
! -re "File .*:\r\nclass $demangled\r\n.*$gdb_prompt $" {
pass "info function for \"$regex\""
}
-re ".*$gdb_prompt $" {
***************
*** 125,131 ****
info_func "operator,(" "void foo::operator,\\(foo &\\);"
info_func "operator~(" "void foo::operator~\\(void\\);"
! info_func "operator delete(" "void foo::operator delete\\(void \\*\\);"
info_func "operator/(" "void foo::operator/\\(foo &\\);"
info_func "operator==(" "void foo::operator==\\(foo &\\);"
info_func "operator^(" "void foo::operator\\^\\(foo &\\);"
--- 132,138 ----
info_func "operator,(" "void foo::operator,\\(foo &\\);"
info_func "operator~(" "void foo::operator~\\(void\\);"
! info_func "operator delete(" "void foo::operator delete\\(void \\*\\)(| static);"
info_func "operator/(" "void foo::operator/\\(foo &\\);"
info_func "operator==(" "void foo::operator==\\(foo &\\);"
info_func "operator^(" "void foo::operator\\^\\(foo &\\);"
***************
*** 146,159 ****
info_func "operator--(" "void foo::operator--\\(int\\);"
info_func "operator!=(" "void foo::operator!=\\(foo &\\);"
info_func "operator!(" "void foo::operator!\\(void\\);"
! info_func "operator new(" "void \\*foo::operator new\\(.*\\);"
info_func "operator||(" "void foo::operator\\|\\|\\(foo &\\);"
info_func "operator char \\*(" "char \\*foo::operator char \\*\\(void\\);"
info_func "operator int(" "int foo::operator int\\(void\\);"
info_func "operator|(" "void foo::operator\\|\\(foo &\\);"
info_func "operator+(" "void foo::operator\\+\\(foo &\\);"
info_func "operator++(" "void foo::operator\\+\\+\\(int\\);"
! info_func "operator->(" "void foo::operator->\\(void\\);"
info_func "operator->\\*(" "void foo::operator->\\*\\(foo &\\);"
info_func "operator>>(" "void foo::operator\>\>\\(foo &\\);"
--- 153,166 ----
info_func "operator--(" "void foo::operator--\\(int\\);"
info_func "operator!=(" "void foo::operator!=\\(foo &\\);"
info_func "operator!(" "void foo::operator!\\(void\\);"
! info_func "operator new(" "void \\*foo::operator new\\(.*\\)(| static);"
info_func "operator||(" "void foo::operator\\|\\|\\(foo &\\);"
info_func "operator char \\*(" "char \\*foo::operator char \\*\\(void\\);"
info_func "operator int(" "int foo::operator int\\(void\\);"
info_func "operator|(" "void foo::operator\\|\\(foo &\\);"
info_func "operator+(" "void foo::operator\\+\\(foo &\\);"
info_func "operator++(" "void foo::operator\\+\\+\\(int\\);"
! info_func "operator->(" "foo \\*foo::operator->\\(void\\);"
info_func "operator->\\*(" "void foo::operator->\\*\\(foo &\\);"
info_func "operator>>(" "void foo::operator\>\>\\(foo &\\);"
***************
*** 167,172 ****
--- 174,180 ----
proc test_paddr_operator_functions {} {
global hex
+ global hp_aCC_compiler
print_addr_of "foo::operator&&(foo &)"
print_addr_of "foo::operator&=(foo &)"
***************
*** 184,190 ****
print_addr_of "foo::operator()(foo &)"
print_addr_of "foo::operator, (foo &)"
print_addr_of "foo::operator~(void)"
! print_addr_of "foo::operator delete(void *)"
print_addr_of "foo::operator/(foo &)"
print_addr_of "foo::operator==(foo &)"
print_addr_of "foo::operator^(foo &)"
--- 192,203 ----
print_addr_of "foo::operator()(foo &)"
print_addr_of "foo::operator, (foo &)"
print_addr_of "foo::operator~(void)"
! if { !$hp_aCC_compiler } {
! print_addr_of "foo::operator delete(void *)"
! } else {
! gdb_test "print &'foo::operator delete(void *) static'" \
! " = .*(0x\[0-9a-f\]+|) <foo::operator delete.*>"
! }
print_addr_of "foo::operator/(foo &)"
print_addr_of "foo::operator==(foo &)"
print_addr_of "foo::operator^(foo &)"
***************
*** 200,206 ****
print_addr_of "foo::operator!=(foo &)"
print_addr_of "foo::operator!(void)"
gdb_test "print &'foo::operator new'" \
! " = .* $hex <foo::operator new\\(.*\\)>"
print_addr_of "foo::operator||(foo &)"
print_addr_of "foo::operator char *(void)"
print_addr_of "foo::operator int(void)"
--- 213,219 ----
print_addr_of "foo::operator!=(foo &)"
print_addr_of "foo::operator!(void)"
gdb_test "print &'foo::operator new'" \
! " = .* $hex <foo::operator new\\(.*\\)(| static)>"
print_addr_of "foo::operator||(foo &)"
print_addr_of "foo::operator char *(void)"
print_addr_of "foo::operator int(void)"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ctti.exp gdb/testsuite/gdb.c++/ctti.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ctti.exp Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ctti.exp Thu Jul 22 17:49:25 1999
***************
*** 0 ****
--- 1,268 ----
+ # Copyright (C) 1998 Free Software Foundation, Inc.
+
+ # This program is free software; you can 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 is part of the gdb testsuite
+ # file written by Elena Zannoni (ezannoni@cygnus.com)
+ #
+ # source files cttiadd.cc, cttiadd1.cc, cttiadd2.cc, cttiadd3.cc
+ #
+
+
+ if $tracelevel then {
+ strace $tracelevel
+ }
+
+
+ # Check to see if we have an executable to test. If not, then either we
+ # haven't tried to compile one, or the compilation failed for some reason.
+ # In either case, just notify the user and skip the tests in this file.
+
+ set testfile "cttiadd"
+ set srcfile ${testfile}.cc
+ set srcfile1 ${testfile}1.cc
+ set srcfile2 ${testfile}2.cc
+ set srcfile3 ${testfile}3.cc
+ set binfile ${objdir}/${subdir}/${testfile}
+
+ if [get_compiler_info ${binfile} "c++"] {
+ return -1;
+ }
+
+ if { $gcc_compiled } then { continue }
+
+ #if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}" "${binfile}" executable {debug c++}] != "" } {
+ # gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ #}
+
+ set cmdline "$CXX_FOR_TARGET ${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3} -g -o ${binfile}"
+
+ remote_exec build $cmdline
+
+ 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 "n\n"
+ gdb_expect {
+ -re "$decimal.*i = 2;.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+
+ send_gdb "n\n"
+ gdb_expect {
+ -re "$decimal.*f = 4.5;.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+ send_gdb "n\n"
+ gdb_expect {
+ -re "$decimal.*c = add\\(c, c\\);.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+ send_gdb "n\n"
+ gdb_expect {
+ -re "$decimal.*i = add\\(i, i\\);.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+ send_gdb "n\n"
+ gdb_expect {
+ -re "$decimal.*f = add\\(f, f\\);.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+ send_gdb "n\n"
+ gdb_expect {
+ -re "$decimal.*add1\\(\\);.*$gdb_prompt $" {
+ pass "next "
+ }
+ -re ".*$gdb_prompt $" { fail "next " }
+ timeout { fail "next " }
+ }
+
+ send_gdb "print c\n"
+ gdb_expect {
+ -re ".$decimal = -62.*\r\n$gdb_prompt $" {
+ pass "print value of c"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of c" }
+ timeout { fail "(timeout) print value of c" }
+ }
+
+
+ send_gdb "print f\n"
+ gdb_expect {
+ -re ".$decimal = 9\r\n$gdb_prompt $" {
+ pass "print value of f"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of f" }
+ timeout { fail "(timeout) print value of f" }
+ }
+
+
+ send_gdb "print i\n"
+ gdb_expect {
+ -re ".$decimal = 4\r\n$gdb_prompt $" {
+ pass "print value of i"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of i" }
+ timeout { fail "(timeout) print value of i" }
+ }
+
+
+
+ send_gdb "print add<int>(2,2)\n"
+ gdb_expect {
+ -re ".$decimal = 4\r\n$gdb_prompt $" {
+ pass "print value of add<int>(2,2)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add<int>(2,2)" }
+ timeout { fail "(timeout) print value of add<int>(2,2)" }
+ }
+
+ send_gdb "print add<float>(2.3,2.3)\n"
+ gdb_expect {
+ -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
+ pass "print value of add<float>(2.3,2.3)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add<float>(2.3,2.3)" }
+ timeout { fail "(timeout) print value of add<float>(2.3,2.3)" }
+ }
+
+ send_gdb "print add<char>('A','A')\n"
+ gdb_expect {
+ -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
+ pass "print value of add<char>('A','A')"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add<char>('A','A')" }
+ timeout { fail "(timeout) print value of add<char>('A','A')" }
+ }
+
+
+ send_gdb "print add2<int>(2,2)\n"
+ gdb_expect {
+ -re ".$decimal = 4\r\n$gdb_prompt $" {
+ pass "print value of add2<int>(2,2)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add2<int>(2,2)" }
+ timeout { fail "(timeout) print value of add2<int>(2,2)" }
+ }
+
+ send_gdb "print add2<float>(2.3,2.3)\n"
+ gdb_expect {
+ -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
+ pass "print value of add2<float>(2.3,2.3)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add2<float>(2.3,2.3)" }
+ timeout { fail "(timeout) print value of add2<float>(2.3,2.3)" }
+ }
+
+ send_gdb "print add2<char>('A','A')\n"
+ gdb_expect {
+ -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
+ pass "print value of add2<char>('A','A')"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add2<char>('A','A')" }
+ timeout { fail "(timeout) print value of add2<char>('A','A')" }
+ }
+
+ send_gdb "print add3<int>(2,2)\n"
+ gdb_expect {
+ -re ".$decimal = 4\r\n$gdb_prompt $" {
+ pass "print value of add3<int>(2,2)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add3<int>(2,2)" }
+ timeout { fail "(timeout) print value of add3<int>(2,2)" }
+ }
+
+ send_gdb "print add3<float>(2.3,2.3)\n"
+ gdb_expect {
+ -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
+ pass "print value of add3<float>(2.3,2.3)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add3<float>(2.3,2.3)" }
+ timeout { fail "(timeout) print value of add3<float>(2.3,2.3)" }
+ }
+
+ send_gdb "print add3<char>('A','A')\n"
+ gdb_expect {
+ -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
+ pass "print value of add3<char>('A','A')"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add3<char>('A','A')" }
+ timeout { fail "(timeout) print value of add3<char>('A','A')" }
+ }
+
+ send_gdb "print add4<int>(2,2)\n"
+ gdb_expect {
+ -re ".$decimal = 4\r\n$gdb_prompt $" {
+ pass "print value of add4<int>(2,2)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add4<int>(2,2)" }
+ timeout { fail "(timeout) print value of add4<int>(2,2)" }
+ }
+
+ send_gdb "print add4<float>(2.3,2.3)\n"
+ gdb_expect {
+ -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
+ pass "print value of add4<float>(2.3,2.3)"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add4<float>(2.3,2.3)" }
+ timeout { fail "(timeout) print value of add4<float>(2.3,2.3)" }
+ }
+
+ send_gdb "print add4<char>('A','A')\n"
+ gdb_expect {
+ -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
+ pass "print value of add4<char>('A','A')"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of add4<char>('A','A')" }
+ timeout { fail "(timeout) print value of add4<char>('A','A')" }
+ }
+
+
+ gdb_exit
+ return 0
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd.cc gdb/testsuite/gdb.c++/cttiadd.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/cttiadd.cc Thu Jul 22 17:49:25 1999
***************
*** 0 ****
--- 1,29 ----
+ template<class T> T add(T v1, T v2)
+ {
+ T v3;
+ v3 = v1;
+ v3 += v2;
+ return v3;
+ }
+
+ int main()
+ {
+ char c;
+ int i;
+ float f;
+ extern void add1();
+ extern void subr2();
+ extern void subr3();
+
+ c = 'a';
+ i = 2;
+ f = 4.5;
+
+ c = add(c, c);
+ i = add(i, i);
+ f = add(f, f);
+
+ add1();
+ subr2();
+ subr3();
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd1.cc gdb/testsuite/gdb.c++/cttiadd1.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd1.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/cttiadd1.cc Thu Jul 22 17:49:25 1999
***************
*** 0 ****
--- 1,16 ----
+ template<class T> T add(T v1, T v2);
+
+ void add1()
+ {
+ char c;
+ int i;
+ float f;
+
+ c = 'b';
+ i = 3;
+ f = 6.5;
+
+ c = add(c, c);
+ i = add(i, i);
+ f = add(f, f);
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd2.cc gdb/testsuite/gdb.c++/cttiadd2.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd2.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/cttiadd2.cc Thu Jul 22 17:49:25 1999
***************
*** 0 ****
--- 1,22 ----
+ template<class T> T add2(T v1, T v2)
+ {
+ T v3;
+ v3 = v1;
+ v3 += v2;
+ return v3;
+ }
+
+ void subr2()
+ {
+ char c;
+ int i;
+ float f;
+
+ c = 'b';
+ i = 3;
+ f = 6.5;
+
+ c = add2(c, c);
+ i = add2(i, i);
+ f = add2(f, f);
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd3.cc gdb/testsuite/gdb.c++/cttiadd3.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/cttiadd3.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/cttiadd3.cc Thu Jul 22 17:49:26 1999
***************
*** 0 ****
--- 1,33 ----
+ template<class T> T add3(T v1, T v2)
+ {
+ T v3;
+ v3 = v1;
+ v3 += v2;
+ return v3;
+ }
+
+ template<class T> T add4(T v1, T v2)
+ {
+ T v3;
+ v3 = v1;
+ v3 += v2;
+ return v3;
+ }
+
+ void subr3()
+ {
+ char c;
+ int i;
+ float f;
+
+ c = 'b';
+ i = 3;
+ f = 6.5;
+
+ c = add3(c, c);
+ i = add3(i, i);
+ f = add3(f, f);
+ c = add4(c, c);
+ i = add4(i, i);
+ f = add4(f, f);
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/demangle.exp gdb/testsuite/gdb.c++/demangle.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/demangle.exp Tue Apr 20 10:15:22 1999
--- gdb/testsuite/gdb.c++/demangle.exp Thu Jul 22 17:49:20 1999
***************
*** 54,64 ****
pass "$style: check demangling style"
}
-re ".*$gdb_prompt $" {
! fail "gnu: check demangling style"
error "set_demangling_style: check style"
}
timeout {
! fail "gnu: check demangling style (timeout)"
error "set_demangling_style: check style"
}
}
--- 54,64 ----
pass "$style: check demangling style"
}
-re ".*$gdb_prompt $" {
! fail "$style: check demangling style"
error "set_demangling_style: check style"
}
timeout {
! fail "$style: check demangling style (timeout)"
error "set_demangling_style: check style"
}
}
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/derivation.exp gdb/testsuite/gdb.c++/derivation.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/derivation.exp Tue Jul 13 20:32:51 1999
--- gdb/testsuite/gdb.c++/derivation.exp Thu Jul 22 17:49:22 1999
***************
*** 127,132 ****
--- 127,133 ----
send_gdb "ptype d_instance\n"
gdb_expect {
-re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const &\\);\[\r\n\t ]+D\\(D const &\\);\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
+ -re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
-re ".*$gdb_prompt $" { fail "ptype d_instance" }
timeout { fail "(timeout) ptype d_instance" }
}
***************
*** 156,161 ****
--- 157,163 ----
send_gdb "ptype e_instance\n"
gdb_expect {
-re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const &\\);\[\r\n\t ]+E\\(E const &\\);\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
+ -re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
-re ".*$gdb_prompt $" { fail "ptype e_instance" }
timeout { fail "(timeout) ptype e_instance" }
}
***************
*** 302,307 ****
--- 304,310 ----
timeout { fail "(timeout) print value of g_instance.c" }
}
+ if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
send_gdb "print g_instance.afoo()\n"
gdb_expect {
-re ".\[0-9\]* = 1.*$gdb_prompt $" {
***************
*** 311,316 ****
--- 314,320 ----
timeout { fail "(timeout) print value of g_instance.afoo()" }
}
+ if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
send_gdb "print g_instance.bfoo()\n"
gdb_expect {
-re ".\[0-9\]* = 2.*$gdb_prompt $" {
***************
*** 320,325 ****
--- 324,330 ----
timeout { fail "(timeout) print value of g_instance.bfoo()" }
}
+ if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
send_gdb "print g_instance.cfoo()\n"
gdb_expect {
-re ".\[0-9\]* = 3.*$gdb_prompt $" {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/inherit.exp gdb/testsuite/gdb.c++/inherit.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/inherit.exp Mon Jan 11 07:20:53 1999
--- gdb/testsuite/gdb.c++/inherit.exp Thu Jul 22 17:49:20 1999
***************
*** 43,57 ****
return -1
}
- # if we are on HPUX and we are not compiled with gcc, then skip these tests.
-
- if [istarget hppa*-*-hpux*] {
- if {!$gcc_compiled} {
- continue
- }
- }
-
-
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."
}
--- 43,48 ----
***************
*** 120,125 ****
--- 111,117 ----
global gdb_prompt
global ws
global nl
+ global hp_aCC_compiler
# Print class A as a type.
***************
*** 144,150 ****
pass "ptype class A (FIXME)"
}
-re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
! setup_xfail "*-*-*"
fail "ptype class A (FIXME)"
}
-re ".*$gdb_prompt $" { fail "ptype class A" }
--- 136,142 ----
pass "ptype class A (FIXME)"
}
-re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
! if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
fail "ptype class A (FIXME)"
}
-re ".*$gdb_prompt $" { fail "ptype class A" }
***************
*** 159,165 ****
pass "ptype g_A (FIXME)"
}
-re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
! setup_xfail "*-*-*"
fail "ptype g_A (FIXME)"
}
-re ".*$gdb_prompt $" { fail "ptype g_A" }
--- 151,157 ----
pass "ptype g_A (FIXME)"
}
-re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
! if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
fail "ptype g_A (FIXME)"
}
-re ".*$gdb_prompt $" { fail "ptype g_A" }
***************
*** 243,254 ****
# Print all members of g_B.
setup_xfail_format "DWARF 1"
! gdb_test "print g_B" ".* = \{\<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" ".* = \{\<A\> = \{a = 7, x = 8\}, c = 9, x = 10\}" "print g_C"
}
#
--- 235,246 ----
# 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"
}
#
***************
*** 270,279 ****
setup_xfail_format "DWARF 1"
send_gdb "print g_anon_union\n"
gdb_expect {
! -re ".* = \{one = 1, = \{a = 2, b = 2\}\}$nl$gdb_prompt $" {
pass "print variable of type anonymous union"
}
! -re ".* = .*\{one = 1, = \{a = 2, b = .*\}\}$nl$gdb_prompt $" {
pass "print variable of type anonymous union (obsolete gcc or gdb)"
}
-re ".*$nl$gdb_prompt $" {
--- 262,271 ----
setup_xfail_format "DWARF 1"
send_gdb "print g_anon_union\n"
gdb_expect {
! -re ".* = \{one = 1, ( = |)\{a = 2, b = 2\}\}$nl$gdb_prompt $" {
pass "print variable of type anonymous union"
}
! -re ".* = .*\{one = 1, ( = |)\{a = 2, b = .*\}\}$nl$gdb_prompt $" {
pass "print variable of type anonymous union (obsolete gcc or gdb)"
}
-re ".*$nl$gdb_prompt $" {
***************
*** 308,313 ****
--- 300,306 ----
proc test_print_mi_members {} {
global gdb_prompt
global nl
+ global hp_aCC_compiler
# Print all members of g_A.
***************
*** 341,355 ****
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! setup_xfail "*-*-*"
send_gdb "print g_D.A::a\n"
! gdb_expect {
! -re ".* = 11$nl$gdb_prompt $" {
! fail "print g_D.A::a (FIXME)"
}
-re ".* = 15$nl$gdb_prompt $" {
fail "print g_D.A::a (FIXME)"
}
-re ".*$gdb_prompt $" { fail "print g_D.A::a" }
timeout { fail "print g_D.A::a (timeout)" ; return }
}
--- 334,354 ----
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_D.A::a\n"
! gdb_expect {
! -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 15$nl$gdb_prompt $" {
! pass "print g_D.A::a"
! }
! -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 11$nl$gdb_prompt $" {
! pass "print g_D.A::a (using B)"
}
-re ".* = 15$nl$gdb_prompt $" {
fail "print g_D.A::a (FIXME)"
}
+ -re ".* = 11$nl$gdb_prompt $" {
+ fail "print g_D.A::a (FIXME)"
+ }
-re ".*$gdb_prompt $" { fail "print g_D.A::a" }
timeout { fail "print g_D.A::a (timeout)" ; return }
}
***************
*** 358,372 ****
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! setup_xfail "*-*-*"
send_gdb "print g_D.A::x\n"
gdb_expect {
! -re ".* = 12$nl$gdb_prompt $" {
! fail "print g_D.A::x (FIXME)"
}
-re ".* = 16$nl$gdb_prompt $" {
fail "print g_D.A::x (FIXME)"
}
-re ".*$gdb_prompt $" { fail "print g_D.A::x" }
timeout { fail "print g_D.A::x (timeout)" ; return }
}
--- 357,377 ----
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_D.A::x\n"
gdb_expect {
! -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 16$nl$gdb_prompt $" {
! pass "print g_D.A::x"
! }
! -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 12$nl$gdb_prompt $" {
! pass "print g_D.A::x (using B)"
}
-re ".* = 16$nl$gdb_prompt $" {
fail "print g_D.A::x (FIXME)"
}
+ -re ".* = 12$nl$gdb_prompt $" {
+ fail "print g_D.A::x (FIXME)"
+ }
-re ".*$gdb_prompt $" { fail "print g_D.A::x" }
timeout { fail "print g_D.A::x (timeout)" ; return }
}
***************
*** 408,422 ****
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! setup_xfail "*-*-*"
send_gdb "print g_E.A::x\n"
gdb_expect {
! -re ".* = 22$nl$gdb_prompt $" {
! fail "print g_E.A::x (FIXME)"
}
-re ".* = 26$nl$gdb_prompt $" {
fail "print g_E.A::x (FIXME)"
}
-re ".*$gdb_prompt $" { fail "print g_E.A::x" }
timeout { fail "print g_E.A::x (timeout)" ; return }
}
--- 413,433 ----
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
! if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_E.A::x\n"
gdb_expect {
! -re "warning: A ambiguous; using E::D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 26$nl$gdb_prompt $" {
! pass "print g_E.A::x"
! }
! -re "warning: A ambiguous; using E::D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 22$nl$gdb_prompt $" {
! pass "print g_E.A::x (using B)"
}
-re ".* = 26$nl$gdb_prompt $" {
fail "print g_E.A::x (FIXME)"
}
+ -re ".* = 22$nl$gdb_prompt $" {
+ fail "print g_E.A::x (FIXME)"
+ }
-re ".*$gdb_prompt $" { fail "print g_E.A::x" }
timeout { fail "print g_E.A::x (timeout)" ; return }
}
***************
*** 474,485 ****
# Print all members of g_D.
setup_xfail_format "DWARF 1"
! gdb_test "print g_D" ".* = \{\<B\> = \{\<A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<C\> = \{\<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" ".* = \{\<D\> = \{\<B\> = \{\<A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<C\> = \{\<A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}" "print g_E"
}
#
--- 485,496 ----
# 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"
}
#
***************
*** 563,568 ****
--- 574,580 ----
proc test_ptype_vi {} {
global gdb_prompt
+ global ws
global nl
# This class does not use any C++-specific features, so it's fine for
***************
*** 608,629 ****
}
setup_xfail_format "DWARF 1"
! gdb_test "ptype vB" "ptype vB\[\r\n\]+type = class vB : public virtual vA \{$nl private:$nl\[ \]+vA \[*\]+_vb\[\\\$\.\]+vA;$nl public:$nl\[ \]+int vb;$nl\[ \]+int vx;$nl.*\}" "ptype vB"
setup_xfail_format "DWARF 1"
! gdb_test "ptype class vB" "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}" "ptype class vB"
setup_xfail_format "DWARF 1"
! gdb_test "ptype g_vB" "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}" "ptype g_vB"
setup_xfail_format "DWARF 1"
! gdb_test "ptype vC" "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}" "ptype vC"
setup_xfail_format "DWARF 1"
! gdb_test "ptype class vC" "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}" "ptype class vC"
setup_xfail_format "DWARF 1"
! gdb_test "ptype g_vC" "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}" "ptype g_vC"
}
#
--- 620,701 ----
}
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 \[*\]+_vb\[\\\$\.\]+vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype vB"
! }
! -re "ptype vB${nl}type = class vB : public virtual vA \{$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype vB (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype vB" }
! 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 \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype class vB"
! }
! -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype class vB (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype class vB" }
! 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 \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype g_vB"
! }
! -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype g_vB (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype g_vB" }
! 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 \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype vC"
! }
! -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype vC (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype vC" }
! 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 \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype class vC"
! }
! -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype class vC (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype class vC" }
! 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 \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype g_vC"
! }
! -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
! pass "ptype g_vC (aCC)"
! }
! -re ".*$gdb_prompt $" { fail "ptype g_vC" }
! timeout { fail "ptype g_vC (timeout)" }
! }
}
#
***************
*** 645,650 ****
--- 717,728 ----
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 $" {
+ pass "print g_vB (aCC)"
+ }
+ -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
+ pass "print g_vB (aCC)"
+ }
-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vb\[\\\$\.\]vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
pass "print g_vB"
}
***************
*** 661,667 ****
# Print all members of g_vC.
setup_xfail_format "DWARF 1"
! gdb_test "print g_vC" ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vb\[\\\$\.\]vA = $hex, vc = 9, vx = 10\}" "print g_vC"
}
#
--- 739,758 ----
# 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 $" {
! pass "print g_vC (aCC)"
! }
! -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
! pass "print g_vC (aCC)"
! }
! -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vb\[\\\$\.\]vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
! pass "print g_vC"
! }
! -re ".*$gdb_prompt $" { fail "print g_vC" }
! timeout { fail "print g_vC (timeout)" }
! }
}
#
***************
*** 743,767 ****
#
proc test_ptype_mvi {} {
global nl
setup_xfail_format "DWARF 1"
! gdb_test "ptype vD" "type = class vD : public virtual vB, public virtual vC \{$nl\[ \]*private:$nl\[ \]*vC \[*\]+_vb\[\\\$\.\]vC;$nl\[ \]*vB \[*\]+_vb\[\\\$\.\]vB;$nl\[ \]*public:$nl\[ \]*int vd;$nl\[ \]*int vx;$nl.*\}" "ptype vD"
setup_xfail_format "DWARF 1"
! gdb_test "ptype class vD" "type = class vD : public virtual vB, public virtual vC \{$nl\[ \]*private:$nl\[ \]*vC \[*\]+_vb\[\\\$\.\]vC;$nl\[ \]*vB \[*\]+_vb\[\\\$\.\]vB;$nl\[ \]*public:$nl\[ \]*int vd;$nl\[ \]*int vx;$nl.*\}" "ptype class vD"
setup_xfail_format "DWARF 1"
! gdb_test "ptype g_vD" "type = class vD : public virtual vB, public virtual vC \{$nl\[ \]*private:$nl\[ \]*vC \[*\]+_vb\[\\\$\.\]vC;$nl\[ \]*vB \[*\]+_vb\[\\\$\.\]vB;$nl\[ \]*public:$nl\[ \]*int vd;$nl\[ \]*int vx;$nl.*\}" "ptype g_vD"
setup_xfail_format "DWARF 1"
! gdb_test "ptype vE" "type = class vE : public virtual vD \{$nl\[ \]*private:$nl\[ \]*vD \[*\]+_vb\[\\\$\.\]vD;$nl\[ \]*public:$nl\[ \]*int ve;$nl\[ \]*int vx;$nl.*\}" "ptype vE"
setup_xfail_format "DWARF 1"
! gdb_test "ptype class vE" "type = class vE : public virtual vD \{$nl\[ \]*private:$nl\[ \]*vD \[*\]+_vb\[\\\$\.\]vD;$nl\[ \]*public:$nl\[ \]*int ve;$nl\[ \]*int vx;$nl.*\}" "ptype class vE"
setup_xfail_format "DWARF 1"
! gdb_test "ptype g_vE" "type = class vE : public virtual vD \{$nl\[ \]*private:$nl\[ \]*vD \[*\]+_vb\[\\\$\.\]vD;$nl\[ \]*public:$nl\[ \]*int ve;$nl\[ \]*int vx;$nl.*\}" "ptype g_vE"
}
#
--- 834,920 ----
#
proc test_ptype_mvi {} {
+ global gdb_prompt
+ global ws
global nl
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 \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype vD"
! }
! -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
! pass "ptype vD"
! }
! -re ".*$gdb_prompt $" { fail "ptype vD" }
! 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 \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype class vD"
! }
! -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
! pass "ptype class vD"
! }
! -re ".*$gdb_prompt $" { fail "ptype class vD" }
! 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 \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype g_vD"
! }
! -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
! pass "ptype g_vD"
! }
! -re ".*$gdb_prompt $" { fail "ptype g_vD" }
! 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 \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype vE"
! }
! -re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
! pass "ptype vE"
! }
! -re ".*$gdb_prompt $" { fail "ptype vE" }
! 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 \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype class vE"
! }
! -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
! pass "ptype class vE"
! }
! -re ".*$gdb_prompt $" { fail "ptype class vE" }
! 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 \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
! pass "ptype g_vE"
! }
! -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
! pass "ptype g_vE"
! }
! -re ".*$gdb_prompt $" { fail "ptype g_vE" }
! timeout { fail "(timeout) ptype g_vE" }
! }
}
#
***************
*** 779,784 ****
--- 932,943 ----
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 $" {
+ pass "print g_vD (aCC)"
+ }
+ -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
+ pass "print g_vD (aCC)"
+ }
-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vb\[\\\$\.\]vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 23, vx = 24\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
pass "print g_vD"
}
***************
*** 795,801 ****
# Print all members of g_vE.
setup_xfail_format "DWARF 1"
! gdb_test "print g_vE" ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vb\[\\\$\.\]vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 0, vx = 0\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 0, vx = 0\}, _vb\[\\\$\.\]vD = $hex, ve = 27, vx = 28\}" "print g_vE"
}
proc do_tests {} {
--- 954,973 ----
# 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 $" {
! pass "print g_vE (aCC)"
! }
! -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
! pass "print g_vE (aCC)"
! }
! -re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vb\[\\\$\.\]vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 0, vx = 0\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 0, vx = 0\}, _vb\[\\\$\.\]vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
! pass "print g_vE"
! }
! -re ".*$gdb_prompt $" { fail "print g_vE" }
! timeout { fail "print g_vE (timeout)" }
! }
}
proc do_tests {} {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/local.exp gdb/testsuite/gdb.c++/local.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/local.exp Fri Jan 8 16:15:43 1999
--- gdb/testsuite/gdb.c++/local.exp Thu Jul 22 17:49:22 1999
***************
*** 41,46 ****
--- 41,49 ----
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
***************
*** 71,108 ****
timeout { fail "(timeout) continue to marker1" }
}
send_gdb "ptype Local\n"
gdb_expect {
! -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 \]*\}\[\t \]*\\(Local at.*local\\.C:10\\).*$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 \]*\}\[\t \]*\\(Local at.*local\\.C:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype Local (incorrect line number?)" }
-re ".*$gdb_prompt $" { fail "ptype Local" }
timeout { fail "(timeout) ptype Local" }
}
send_gdb "ptype InnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:36\\).*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:36\\).*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal" }
timeout { fail "(timeout) ptype InnerLocal" }
}
send_gdb "ptype NestedInnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:44\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal (incorrect line number?)" }
-re "No symbol.*in current context.*$gdb_prompt $" { pass "ptype NestedInnerLocal (known aCC limitation)" }
-re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" }
timeout { fail "(timeout) ptype NestedInnerLocal" }
}
send_gdb "ptype InnerLocal::NestedInnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:44\\).*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.C:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal (incorrect line number?)" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal" }
timeout { fail "(timeout) ptype InnerLocal::NestedInnerLocal" }
}
--- 74,145 ----
timeout { fail "(timeout) continue to marker1" }
}
+ # srikanth, These tests have always been run only with aCC. Now in
+ # the new scheme of things, we run it twice, once with aCC, and once
+ # with g++. Flag these tests as expected failures when run with g++.
+ # as these are failing now and were never known to pass with g++.
+ global gcc_compiled
+ if {$gcc_compiled} then {
+ setup_xfail "*-*-*"
+ }
+
send_gdb "ptype Local\n"
gdb_expect {
! -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 \]*\}\[\t \]*\\(Local at.*local\\.cc:10\\).*$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 \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype Local (incorrect line number?)" }
! -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*Local & Local::operator=\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(void\\);\r\n\[\t \]*char Local::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 \]*Local & Local const &\\);\r\n\[\t \]*Local const &\\);\r\n\[\t \]*Local\\(void\\);\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\}\[\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 $" { pass "ptype Local (aCC)" }
-re ".*$gdb_prompt $" { fail "ptype Local" }
timeout { fail "(timeout) ptype Local" }
}
+ # 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
+ # because of two reasons:
+ # There is a number at the end of InnerLocal4 which should not be there,
+ # DTS CLLbs14316
+ # The line number for the class
+ setup_xfail "hppa*-*-*" CLLbs14316
send_gdb "ptype InnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal HP aCC" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal::operator=\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::il_foo\\(unsigned char const &\\);\r\n\*\}\r\n*.*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal const &\\);\r\n\[\t \]*InnerLocal const &\\);\r\n\[\t \]*InnerLocal\\(void\\);\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*.*$gdb_prompt $" { pass "ptype InnerLocal" }
! -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (aCC)" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal" }
timeout { fail "(timeout) ptype InnerLocal" }
}
+ if {$gcc_compiled} then {
+ setup_xfail "*-*-*"
+ }
+
send_gdb "ptype NestedInnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:44\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal (incorrect line number?)" }
! -re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & InnerLocal::NestedInnerLocal::operator=\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::NestedInnerLocal::nil_foo\\(int\\);\r\n\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
! -re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\(void\\);\r\n\[\t \]*int nil_foo\\(int\\);\r\n\[\t \]*\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
-re "No symbol.*in current context.*$gdb_prompt $" { pass "ptype NestedInnerLocal (known aCC limitation)" }
-re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" }
timeout { fail "(timeout) ptype NestedInnerLocal" }
}
+ # gdb incorrectly interprets the NestedInnerLocal in
+ # InnerLocal::NestedInnerLocal as field name instead of a type name;
+ # See CLLbs14784.
+ setup_xfail hppa*-*-* CLLbs14784
send_gdb "ptype InnerLocal::NestedInnerLocal\n"
gdb_expect {
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:44\\).*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
! -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal (incorrect line number?)" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal" }
timeout { fail "(timeout) ptype InnerLocal::NestedInnerLocal" }
}
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/member-ptr.exp gdb/testsuite/gdb.c++/member-ptr.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/member-ptr.exp Tue Jun 22 17:40:56 1999
--- gdb/testsuite/gdb.c++/member-ptr.exp Thu Jul 22 17:49:26 1999
***************
*** 103,108 ****
--- 103,109 ----
# print pointer to data member
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
***************
*** 115,120 ****
--- 116,122 ----
# print dereferenced pointer to data member
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
***************
*** 127,132 ****
--- 129,135 ----
# print dereferenced pointer to data member
# this time, dereferenced through a pointer
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
***************
*** 212,217 ****
--- 215,221 ----
}
# Double-check by printing a.
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a\n"
gdb_expect {
-re "\\$\[0-9\]* = \{c = 120 'x', j = 33, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
***************
*** 244,249 ****
--- 248,254 ----
}
# Double-check by printing a.
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a\n"
gdb_expect {
-re "\\$\[0-9\]* = \{c = 120 'x', j = 44, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
***************
*** 290,295 ****
--- 295,301 ----
# Ptype a pointer to a method.
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "ptype pmf\n"
gdb_expect {
-re "type = int \\( A::\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
***************
*** 301,306 ****
--- 307,313 ----
# print a pointer to a method
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmf\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\(\\.\\.\\.\\)\\) \\?\\? <not supported with HP aCC>\r\n$gdb_prompt $" {
***************
*** 313,318 ****
--- 320,326 ----
# Ptype a pointer to a pointer to a method
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "ptype pmf_p\n"
gdb_expect {
-re "type = int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
***************
*** 324,329 ****
--- 332,338 ----
# print a pointer to a pointer to a method
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmf_p\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\\) $hex\r\n$gdb_prompt $" {
***************
*** 335,373 ****
# print dereferenced pointer to method
send_gdb "print a.*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a.*pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "print a.*pmf -- ??" }
timeout { fail "(timeout) print a.*pmf" }
}
# print dereferenced pointer to method, using ->*
send_gdb "print a_p->*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a_p->*pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "print a_p->*pmf -- ??" }
timeout { fail "(timeout) print a_p->*pmf" }
}
# set the pointer to data member
send_gdb "set var pmf = &A::foo\n"
gdb_expect {
-re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
pass "set var pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "set var pmf -- ??" }
timeout { fail "(timeout) set var pmf" }
}
# Try to dereference the pointer to method without any object
send_gdb "print *pmf\n"
gdb_expect {
-re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
--- 344,386 ----
# print dereferenced pointer to method
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a.*pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "print a.*pmf" }
timeout { fail "(timeout) print a.*pmf" }
}
# print dereferenced pointer to method, using ->*
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a_p->*pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "print a_p->*pmf" }
timeout { fail "(timeout) print a_p->*pmf" }
}
# set the pointer to data member
+ setup_xfail "hppa*-*-*"
send_gdb "set var pmf = &A::foo\n"
gdb_expect {
-re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
pass "set var pmf (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "set var pmf" }
timeout { fail "(timeout) set var pmf" }
}
# Try to dereference the pointer to method without any object
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print *pmf\n"
gdb_expect {
-re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
***************
*** 389,394 ****
--- 402,408 ----
}
# Check cast of pointer to member to integer
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (int) pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 8\r\n$gdb_prompt $" {
***************
*** 399,435 ****
}
# Check cast of pointer to method to integer
send_gdb "print (int) pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "casting pmf to int (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "casting pmf to int -- ??" }
timeout { fail "(timeout) casting pmf to int" }
}
# Try to invoke a function through a pointer to data member
send_gdb "print (a.*pmi)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- error message should be different"
}
! -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3) -- ???" }
timeout { fail "(timeout) print (a.*pmi)(3)" }
}
# Try to invoke a function through a pointer to a method
send_gdb "print (a.*pmf)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- known aCC limitation"
}
! -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3) -- ???" }
timeout { fail "(timeout) print (a.*pmf)(3)" }
}
# Go past assignment of NULL to pmi
send_gdb "next\n"
gdb_expect {
-re "\r\n85\[ \t\]*k = \\(a.\\*pmf\\)\\(3\\);\r\n$gdb_prompt $" {
--- 413,453 ----
}
# Check cast of pointer to method to integer
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (int) pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "casting pmf to int (known aCC limitation)"
}
! -re ".*$gdb_prompt $" { fail "casting pmf to int" }
timeout { fail "(timeout) casting pmf to int" }
}
# Try to invoke a function through a pointer to data member
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (a.*pmi)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- error message should be different"
}
! -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3)" }
timeout { fail "(timeout) print (a.*pmi)(3)" }
}
# Try to invoke a function through a pointer to a method
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (a.*pmf)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- known aCC limitation"
}
! -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3)" }
timeout { fail "(timeout) print (a.*pmf)(3)" }
}
# Go past assignment of NULL to pmi
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "next\n"
gdb_expect {
-re "\r\n85\[ \t\]*k = \\(a.\\*pmf\\)\\(3\\);\r\n$gdb_prompt $" {
***************
*** 449,454 ****
--- 467,473 ----
#}
# Dereference the null pointer to member
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
***************
*** 469,474 ****
--- 488,494 ----
timeout { fail "(timeout) set break at 91" }
}
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "continue\n"
gdb_expect {
-re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:91\r\n91\[ \t]*k = \\(a.\\*pmf\\)\\(4\\);\r\n$gdb_prompt $" {
***************
*** 482,487 ****
--- 502,508 ----
# Now check again that pmi works even when not set to
# something that's at the beginning of the object
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
***************
*** 494,499 ****
--- 515,521 ----
# print dereferenced pointer to data member
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
***************
*** 506,511 ****
--- 528,534 ----
# print dereferenced pointer to data member
# this time, dereferenced through a pointer
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/method.exp gdb/testsuite/gdb.c++/method.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/method.exp Thu Mar 18 23:35:17 1999
--- gdb/testsuite/gdb.c++/method.exp Thu Jul 22 17:49:22 1999
***************
*** 50,56 ****
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
!
gdb_exit
gdb_start
--- 50,58 ----
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
***************
*** 143,149 ****
--- 145,164 ----
send_gdb "print this\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(const class A \\*\\) $hex\r\n$gdb_prompt $" {
+ global gcc_compiled
+ if {$gcc_compiled} {
+ xfail "print this (in bar)"
+ } else {
+ pass "print this (in bar)"
+ }
+ }
+ -re "\\$\[0-9\]* = \\(A \\*\\) $hex\r\n$gdb_prompt $" {
+ global gcc_compiled
+ if {$gcc_compiled} {
pass "print this (in bar)"
+ } else {
+ xfail "print this (in bar)"
+ }
}
-re ".*$gdb_prompt $" { fail "print this (in bar)" }
timeout { fail "(timeout) print this (in bar)" }
***************
*** 209,215 ****
send_gdb "ptype A\n"
gdb_expect {
! -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\\[ \]*A & operator=\\(A const &\\);\r\n\[ \]*A\\(A const &\\)\r\n\[ \]*A\\(void\\)\r\n[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) const volatile;\r\n\}\r\n$gdb_prompt $" {
pass "ptype A"
}
-re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {
--- 224,230 ----
send_gdb "ptype A\n"
gdb_expect {
! -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*A & operator=\\(A const &\\);\r\n\[ \]*A\\(A const &\\);\r\n\[ \]*A\\(void\\);\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) const volatile;\r\n\}\r\n$gdb_prompt $" {
pass "ptype A"
}
-re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/misc.cc gdb/testsuite/gdb.c++/misc.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/misc.cc Thu Mar 25 15:35:18 1999
--- gdb/testsuite/gdb.c++/misc.cc Thu Jul 22 17:49:20 1999
***************
*** 1,5 ****
--- 1,9 ----
// Test various -*- C++ -*- things.
+ // ====================== basic C++ types =======================
+ bool v_bool;
+ bool v_bool_array[2];
+
typedef struct fleep fleep;
struct fleep { int a; } s;
***************
*** 477,482 ****
--- 481,494 ----
return v.x + 5;
}
+ void dummy()
+ {
+ v_bool = true;
+ v_bool_array[0] = false;
+ v_bool_array[1] = v_bool;
+ }
+
+
int
main()
{
***************
*** 484,489 ****
--- 496,502 ----
set_debug_traps();
breakpoint();
#endif
+ dummy();
inheritance1 ();
inheritance3 ();
register_class ();
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/misc.exp gdb/testsuite/gdb.c++/misc.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/misc.exp Mon Jan 4 14:14:09 1999
--- gdb/testsuite/gdb.c++/misc.exp Thu Jul 22 17:49:20 1999
***************
*** 79,84 ****
--- 79,101 ----
}
}
+ proc test_expr { args } {
+ if { [llength $args] % 2 } {
+ warning "an even # of arguments should be passed to test_expr"
+ }
+ set last_ent [expr [llength $args] - 1];
+ set testname [lindex $args $last_ent];
+ if [gdb_test [lindex $args 0] "" "$testname (setup)"] {
+ gdb_suppress_tests;
+ }
+ for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} {
+ if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] {
+ gdb_suppress_tests;
+ }
+ }
+ gdb_stop_suppressing_tests;
+ }
+
proc do_tests {} {
global prms_id
global bug_id
***************
*** 104,106 ****
--- 121,161 ----
}
do_tests
+
+ test_expr "set language c++" \
+ "print 1 == 1" "print.*\\$\[0-9\]* = true" \
+ "print 1 == 2" "print.*\\$\[0-9\]* = false" \
+ "print as bool"
+
+ # Test bool type printing, etc.
+ # Note: Language is already set to C++ above!
+ gdb_test "print v_bool" "\\$\[0-9\]* = false" "print a bool var"
+
+ # set a bool variable
+ test_expr "set variable v_bool = true" \
+ "print v_bool" "\\$\[0-9\]* = true" \
+ "set a bool var"
+
+ # next print an array of bool
+ gdb_test "print v_bool_array" "\\$\[0-9\]* = \\{false, false\\}" "print a bool array"
+
+ # set elements of a bool array
+ test_expr "set variable v_bool_array\[1\] = true" \
+ "print v_bool_array" "\\$\[0-9\]* = \\{false, true\\}" \
+ "set a bool array elem"
+
+ # bool constants
+ gdb_test "print true" "\\$\[0-9\]* = true" "print true"
+ gdb_test "print false" "\\$\[0-9\]* = false" "print false"
+
+ # arithmetic conversions
+ gdb_test "print 1 + true" "\\$\[0-9\]* = 2" "1 + true"
+ gdb_test "print 3 + false" "\\$\[0-9\]* = 3" "3 + false"
+ gdb_test "print 1 < 2 < 3" "\\$\[0-9\]* = true" "1 < 2 < 3"
+ gdb_test "print 2 < 1 > 4" "\\$\[0-9\]* = false" "2 < 1 > 4"
+ gdb_test "print (bool)43" "\\$\[0-9\]* = true" "(bool)43"
+ gdb_test "print (bool)0" "\\$\[0-9\]* = false" "(bool)0"
+ gdb_test "print (bool)17.93" "\\$\[0-9\]* = true" "(bool)17.93"
+ gdb_test "print (bool)0.0" "\\$\[0-9\]* = false" "(bool)0.0"
+ gdb_test "print (int)true" "\\$\[0-9\]* = 1" "(int)true"
+ gdb_test "print (int)false" "\\$\[0-9\]* = 0" "(int)false"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/overload.exp gdb/testsuite/gdb.c++/overload.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/overload.exp Fri Jun 18 13:37:31 1999
--- gdb/testsuite/gdb.c++/overload.exp Thu Jul 22 17:49:22 1999
***************
*** 43,51 ****
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
- # Create and source the file that provides information about the compiler
- # used to compile the test case.
-
if [get_compiler_info ${binfile} "c++"] {
return -1
}
--- 43,48 ----
***************
*** 88,93 ****
--- 85,91 ----
}
+ setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "ptype foo_instance1\n"
gdb_expect {
-re "type = class foo \{.*public:.*int ifoo;.*const char \\*ccpfoo;.*foo\\(int\\);.*foo\\(int, (const char|char const) \\*\\);.*foo\\(foo &\\);.*~foo\\(void\\);.*void foofunc\\(int\\);.*void foofunc\\(int, signed char \\*\\);.*int overload1arg\\(void\\);.*int overload1arg\\(char\\);.*int overload1arg\\(signed char\\);.*int overload1arg\\(unsigned char\\);.*int overload1arg\\(short\\);.*int overload1arg\\(unsigned short\\);.*int overload1arg\\(int\\);.*int overload1arg\\(unsigned int\\);.*int overload1arg\\(long\\);.*int overload1arg\\(unsigned long\\);.*int overload1arg\\(float\\);.*int overload1arg\\(double\\);.*int overloadargs\\(int\\);.*int overloadargs\\(int, int\\);.*int overloadargs\\(int, int, int\\);.*int overloadargs\\(int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" {
***************
*** 123,130 ****
# work right for G++ output, since the list of parameters seems not to
# be filled in correctly. Until this gets fixed, don't expect to pass
# these tests.
- if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1)\n"
gdb_expect {
-re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
--- 121,128 ----
# work right for G++ output, since the list of parameters seems not to
# be filled in correctly. Until this gets fixed, don't expect to pass
# these tests.
+ setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1)\n"
gdb_expect {
-re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
***************
*** 135,141 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2)\n"
gdb_expect {
--- 133,139 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2)\n"
gdb_expect {
***************
*** 147,153 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3)\n"
gdb_expect {
--- 145,151 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3)\n"
gdb_expect {
***************
*** 159,165 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4)\n"
gdb_expect {
--- 157,163 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4)\n"
gdb_expect {
***************
*** 171,177 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5)\n"
gdb_expect {
--- 169,175 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5)\n"
gdb_expect {
***************
*** 183,189 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)\n"
gdb_expect {
--- 181,187 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)\n"
gdb_expect {
***************
*** 195,201 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)\n"
gdb_expect {
--- 193,199 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)\n"
gdb_expect {
***************
*** 207,213 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)\n"
gdb_expect {
--- 205,211 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)\n"
gdb_expect {
***************
*** 219,225 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)\n"
gdb_expect {
--- 217,223 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)\n"
gdb_expect {
***************
*** 231,237 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)\n"
gdb_expect {
--- 229,235 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)\n"
gdb_expect {
***************
*** 243,249 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)\n"
gdb_expect {
--- 241,247 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)\n"
gdb_expect {
***************
*** 255,261 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg()\n"
gdb_expect {
--- 253,259 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg()\n"
gdb_expect {
***************
*** 267,273 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((char)arg2)\n"
gdb_expect {
--- 265,271 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((char)arg2)\n"
gdb_expect {
***************
*** 279,285 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((signed char)arg3)\n"
gdb_expect {
--- 277,283 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((signed char)arg3)\n"
gdb_expect {
***************
*** 291,297 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((unsigned char)arg4)\n"
gdb_expect {
--- 289,295 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((unsigned char)arg4)\n"
gdb_expect {
***************
*** 303,309 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((short)arg5)\n"
gdb_expect {
--- 301,307 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((short)arg5)\n"
gdb_expect {
***************
*** 315,321 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n"
gdb_expect {
--- 313,319 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n"
gdb_expect {
***************
*** 327,333 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((int)arg7)\n"
gdb_expect {
--- 325,331 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((int)arg7)\n"
gdb_expect {
***************
*** 339,345 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((unsigned int)arg8)\n"
gdb_expect {
--- 337,343 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((unsigned int)arg8)\n"
gdb_expect {
***************
*** 351,357 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((long)arg9)\n"
gdb_expect {
--- 349,355 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((long)arg9)\n"
gdb_expect {
***************
*** 363,369 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n"
gdb_expect {
--- 361,367 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n"
gdb_expect {
***************
*** 375,381 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((float)arg11)\n"
gdb_expect {
--- 373,379 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((float)arg11)\n"
gdb_expect {
***************
*** 387,393 ****
}
! if {$gcc_compiled} then { setup_xfail "*-*-*" }
send_gdb "print foo_instance1.overload1arg((double)arg12)\n"
gdb_expect {
--- 385,391 ----
}
! setup_xfail "*-*-*" CLLbs16901
send_gdb "print foo_instance1.overload1arg((double)arg12)\n"
gdb_expect {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ.cc gdb/testsuite/gdb.c++/ref-typ.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ref-typ.cc Thu Jul 22 17:49:27 1999
***************
*** 0 ****
--- 1,30 ----
+ void marker1 (void)
+ {
+
+ }
+
+
+
+ int main(void)
+ {
+ short s;
+ short &rs = s;
+ short *ps;
+ short *&rps = ps;
+ short as[4];
+ short (&ras)[4] = as;
+ s = -1;
+ ps = &s;
+ as[0] = 0;
+ as[1] = 1;
+ as[2] = 2;
+ as[3] = 3;
+
+ #ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+ #endif
+ marker1();
+
+ return 0;
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ.exp gdb/testsuite/gdb.c++/ref-typ.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ.exp Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ref-typ.exp Thu Jul 22 17:49:27 1999
***************
*** 0 ****
--- 1,278 ----
+ # Tests for reference types with short type variables in GDB.
+ # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ # This program is free software; you can 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
+
+ # written by Elena Zannoni (ezannoni@cygnus.com)
+
+ if $tracelevel then {
+ strace $tracelevel
+ }
+
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+
+ set testfile "ref-typ"
+ 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."
+ }
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+ }
+
+ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
+
+ send_gdb "cont\n"
+ gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {}
+ timeout { fail "up from marker1" }
+ }
+ }
+ -re "$gdb_prompt $" { fail "continue to marker1" }
+ timeout { fail "(timeout) continue to marker1" }
+ }
+
+
+ proc gdb_start_again {} {
+ global srcdir
+ global subdir
+ global binfile
+ global gdb_prompt
+ global decimal
+
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ source ${binfile}.ci
+
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+ }
+
+ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
+
+ send_gdb "cont\n"
+ gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {}
+ timeout { fail "up from marker1" }
+ }
+ }
+ -re "$gdb_prompt $" { fail "continue to marker1" }
+ timeout { fail "(timeout) continue to marker1" }
+ }
+ }
+
+
+
+
+
+ send_gdb "print s\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -1.*$gdb_prompt $" {
+ pass "print value of s"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of s" }
+ timeout { fail "(timeout) print value of s" }
+ }
+
+
+ send_gdb "ptype s\n"
+ gdb_expect {
+ -re "type = short.*$gdb_prompt $" { pass "ptype s" }
+ -re ".*$gdb_prompt $" { fail "ptype s" }
+ timeout { fail "(timeout) ptype s" }
+ }
+
+
+ send_gdb "print *ps\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -1.*$gdb_prompt $" {
+ pass "print value of ps"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of ps" }
+ timeout { fail "(timeout) print value of ps" }
+ }
+
+
+ send_gdb "ptype ps\n"
+ gdb_expect {
+ -re "type = short \*.*$gdb_prompt $" { pass "ptype ps" }
+ -re ".*$gdb_prompt $" { fail "ptype ps" }
+ timeout { fail "(timeout) ptype ps" }
+ }
+
+ send_gdb "print as\[0\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 0.*$gdb_prompt $" {
+ pass "print value of as\[0\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of as\[0\]" }
+ timeout { fail "(timeout) print value of as\[0\]" }
+ }
+
+
+ send_gdb "ptype as\n"
+ gdb_expect {
+ -re "type = short \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
+ -re "type = short int \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
+ -re ".*$gdb_prompt $" { fail "ptype as" }
+ timeout { fail "(timeout) ptype as" }
+ }
+
+ send_gdb "print as\[1\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 1.*$gdb_prompt $" {
+ pass "print value of as\[1\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of as\[1\]" }
+ timeout { fail "(timeout) print value of as\[1\]" }
+ }
+
+ send_gdb "print as\[2\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 2.*$gdb_prompt $" {
+ pass "print value of as\[2\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of as\[2\]" }
+ timeout { fail "(timeout) print value of as\[2\]" }
+ }
+
+ send_gdb "print as\[3\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 3.*$gdb_prompt $" {
+ pass "print value of as\[3\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of as\[3\]" }
+ timeout { fail "(timeout) print value of as\[3\]" }
+ }
+
+ send_gdb "print rs\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(short &\\) @$hex: -1.*$gdb_prompt $" {
+ pass "print value of rs"
+ }
+ -re ".\[0-9\]* = \\(short int &\\) @$hex: -1.*$gdb_prompt $" {
+ pass "print value of rs"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rs" }
+ timeout { fail "(timeout) print value of rs" }
+ eof { fail "print rs ($GDB dumped core) (FIXME)" ; gdb_start_again ; }
+
+ }
+
+ send_gdb "ptype rs\n"
+ gdb_expect {
+ -re "type = short &.*$gdb_prompt $" { pass "ptype rs" }
+ -re "type = short int &.*$gdb_prompt $" { pass "ptype rs" }
+ -re ".*$gdb_prompt $" { fail "ptype rs" }
+ timeout { fail "(timeout) ptype rs" }
+ }
+
+
+ send_gdb "print *rps\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -1.*$gdb_prompt $" {
+ pass "print value of *rps"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of *rps" }
+ timeout { fail "(timeout) print value of *rps" }
+ }
+
+
+ send_gdb "ptype rps\n"
+ gdb_expect {
+ -re "type = short \\*&.*$gdb_prompt $" { pass "ptype rps" }
+ -re "type = short int \\*&.*$gdb_prompt $" { pass "ptype rps" }
+ -re ".*$gdb_prompt $" { fail "ptype rps" }
+ timeout { fail "(timeout) ptype rps" }
+ }
+
+
+
+ send_gdb "print ras\[0\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 0.*$gdb_prompt $" {
+ pass "print value of ras\[0\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of ras\[0\]" }
+ timeout { fail "(timeout) print value of ras\[0\]" }
+ }
+
+
+ send_gdb "ptype ras\n"
+ gdb_expect {
+ -re "type = short \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
+ -re "type = short int \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
+ -re ".*$gdb_prompt $" { fail "ptype ras" }
+ timeout { fail "(timeout) ptype ras" }
+ }
+
+ send_gdb "print ras\[1\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 1.*$gdb_prompt $" {
+ pass "print value of ras\[1\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of ras\[1\]" }
+ timeout { fail "(timeout) print value of ras\[1\]" }
+ }
+
+ send_gdb "print ras\[2\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 2.*$gdb_prompt $" {
+ pass "print value of ras\[2\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of ras\[2\]" }
+ timeout { fail "(timeout) print value of ras\[2\]" }
+ }
+
+ send_gdb "print ras\[3\]\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 3.*$gdb_prompt $" {
+ pass "print value of ras\[3\]"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of ras\[3\]" }
+ timeout { fail "(timeout) print value of ras\[3\]" }
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ2.cc gdb/testsuite/gdb.c++/ref-typ2.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ2.cc Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ref-typ2.cc Thu Jul 22 17:49:27 1999
***************
*** 0 ****
--- 1,47 ----
+ int f()
+ {
+ int f1;
+ f1 = 1;
+ return f1;
+ }
+
+ int main(void)
+ {
+ char C;
+ unsigned char UC;
+ short S;
+ unsigned short US;
+ int I;
+ unsigned int UI;
+ long L;
+ unsigned long UL;
+ float F;
+ double D;
+ char &rC = C;
+ unsigned char &rUC = UC;
+ short &rS = S;
+ unsigned short &rUS = US;
+ int &rI = I;
+ unsigned int &rUI = UI;
+ long &rL = L;
+ unsigned long &rUL = UL;
+ float &rF = F;
+ double &rD = D;
+ C = 'A';
+ UC = 21;
+ S = -14;
+ US = 7;
+ I = 102;
+ UI = 1002;
+ L = -234;
+ UL = 234;
+ F = 1.25E10;
+ D = -1.375E-123;
+ I = f();
+ #ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+ #endif
+ return 0;
+
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ2.exp gdb/testsuite/gdb.c++/ref-typ2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-typ2.exp Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.c++/ref-typ2.exp Thu Jul 22 17:49:28 1999
***************
*** 0 ****
--- 1,463 ----
+ # Tests for reference types with elementary type variables in GDB.
+ # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ # This program is free software; you can 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
+
+ # written by Elena Zannoni (ezannoni@cygnus.com)
+
+ if $tracelevel then {
+ strace $tracelevel
+ }
+
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+
+ set testfile "ref-typ2"
+ 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."
+ }
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+ }
+
+ send_gdb "break f\n" ; gdb_expect -re ".*$gdb_prompt $"
+
+ send_gdb "cont\n"
+ gdb_expect {
+ -re "Break.* f \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {}
+ timeout { fail "up from f" }
+ }
+ }
+ -re "$gdb_prompt $" { fail "continue to f" }
+ timeout { fail "(timeout) continue to f" }
+ }
+
+
+ send_gdb "print C\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 65 \'A\'.*$gdb_prompt $" {
+ pass "print value of C"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of C" }
+ timeout { fail "(timeout) print value of C" }
+ }
+
+
+ send_gdb "ptype C\n"
+ gdb_expect {
+ -re "type = char.*$gdb_prompt $" { pass "ptype C" }
+ -re ".*$gdb_prompt $" { fail "ptype C" }
+ timeout { fail "(timeout) ptype C" }
+ }
+
+
+ send_gdb "print UC\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 21 '\.025'\.*$gdb_prompt $" {
+ pass "print value of UC"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of UC" }
+ timeout { fail "(timeout) print value of UC" }
+ }
+
+
+ send_gdb "ptype UC\n"
+ gdb_expect {
+ -re "type = unsigned char.*$gdb_prompt $" { pass "ptype UC" }
+ -re ".*$gdb_prompt $" { fail "ptype UC" }
+ timeout { fail "(timeout) ptype UC" }
+ }
+
+
+ send_gdb "print S\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -14.*$gdb_prompt $" {
+ pass "print value of S"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of S" }
+ timeout { fail "(timeout) print value of S" }
+ }
+
+
+ send_gdb "ptype S\n"
+ gdb_expect {
+ -re "type = short.*$gdb_prompt $" { pass "ptype S" }
+ -re ".*$gdb_prompt $" { fail "ptype S" }
+ timeout { fail "(timeout) ptype S" }
+ }
+
+
+ send_gdb "print US\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 7.*$gdb_prompt $" {
+ pass "print value of US"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of US" }
+ timeout { fail "(timeout) print value of US" }
+ }
+
+
+ send_gdb "ptype US\n"
+ gdb_expect {
+ -re "type = unsigned short.*$gdb_prompt $" { pass "ptype US" }
+ -re "type = short unsigned.*$gdb_prompt $" { pass "ptype US" }
+ -re ".*$gdb_prompt $" { fail "ptype US" }
+ timeout { fail "(timeout) ptype US" }
+ }
+
+
+ send_gdb "print I\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 102.*$gdb_prompt $" {
+ pass "print value of I"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of I" }
+ timeout { fail "(timeout) print value of I" }
+ }
+
+
+ send_gdb "ptype I\n"
+ gdb_expect {
+ -re "type = int.*$gdb_prompt $" { pass "ptype I" }
+ -re ".*$gdb_prompt $" { fail "ptype I" }
+ timeout { fail "(timeout) ptype I" }
+ }
+
+
+ send_gdb "print UI\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 1002.*$gdb_prompt $" {
+ pass "print value of UI"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of UI" }
+ timeout { fail "(timeout) print value of UI" }
+ }
+
+
+ send_gdb "ptype UI\n"
+ gdb_expect {
+ -re "type = unsigned int.*$gdb_prompt $" { pass "ptype UI" }
+ -re ".*$gdb_prompt $" { fail "ptype UI" }
+ timeout { fail "(timeout) ptype UI" }
+ }
+
+
+ send_gdb "print L\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -234.*$gdb_prompt $" {
+ pass "print value of L"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of L" }
+ timeout { fail "(timeout) print value of L" }
+ }
+
+
+ send_gdb "ptype L\n"
+ gdb_expect {
+ -re "type = long.*$gdb_prompt $" { pass "ptype L" }
+ -re ".*$gdb_prompt $" { fail "ptype L" }
+ timeout { fail "(timeout) ptype L" }
+ }
+
+
+ send_gdb "print UL\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 234.*$gdb_prompt $" {
+ pass "print value of UL"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of UL" }
+ timeout { fail "(timeout) print value of UL" }
+ }
+
+
+ send_gdb "ptype UL\n"
+ gdb_expect {
+ -re "type = unsigned long.*$gdb_prompt $" { pass "ptype UL" }
+ -re "type = long unsigned.*$gdb_prompt $" { pass "ptype UL" }
+ -re ".*$gdb_prompt $" { fail "ptype UL" }
+ timeout { fail "(timeout) ptype UL" }
+ }
+
+
+ send_gdb "print F\n"
+ gdb_expect {
+ -re ".\[0-9\]* = 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
+ pass "print value of F"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of F" }
+ timeout { fail "(timeout) print value of F" }
+ }
+
+
+
+ send_gdb "ptype F\n"
+ gdb_expect {
+ -re "type = float.*$gdb_prompt $" { pass "ptype F" }
+ -re ".*$gdb_prompt $" { fail "ptype F" }
+ timeout { fail "(timeout) ptype F" }
+ }
+
+
+ send_gdb "print D\n"
+ gdb_expect {
+ -re ".\[0-9\]* = -1.375e-123.*$gdb_prompt $" {
+ pass "print value of D"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of D" }
+ timeout { fail "(timeout) print value of D" }
+ }
+
+
+ send_gdb "ptype D\n"
+ gdb_expect {
+ -re "type = double.*$gdb_prompt $" { pass "ptype D" }
+ -re ".*$gdb_prompt $" { fail "ptype D" }
+ timeout { fail "(timeout) ptype D" }
+ }
+
+
+
+ #
+ # test reference types
+ #
+
+
+
+
+ send_gdb "ptype rC\n"
+ gdb_expect {
+ -re "type = char &.*$gdb_prompt $" { pass "ptype rC" }
+ -re ".*$gdb_prompt $" { fail "ptype rC" }
+ timeout { fail "(timeout) ptype rC" }
+ }
+
+
+
+
+ send_gdb "ptype rUC\n"
+ gdb_expect {
+ -re "type = unsigned char &.*$gdb_prompt $" { pass "ptype rUC" }
+ -re ".*$gdb_prompt $" { fail "ptype rUC" }
+ timeout { fail "(timeout) ptype rUC" }
+ }
+
+
+
+ send_gdb "ptype rS\n"
+ gdb_expect {
+ -re "type = short &.*$gdb_prompt $" { pass "ptype rS" }
+ -re "type = short int &.*$gdb_prompt $" { pass "ptype rS" }
+ -re ".*$gdb_prompt $" { fail "ptype rS" }
+ timeout { fail "(timeout) ptype rS" }
+ }
+
+
+
+ send_gdb "ptype rUS\n"
+ gdb_expect {
+ -re "type = unsigned short &.*$gdb_prompt $" { pass "ptype rUS" }
+ -re "type = short unsigned int &.*$gdb_prompt $" { pass "ptype rUS" }
+ -re ".*$gdb_prompt $" { fail "ptype rUS" }
+ timeout { fail "(timeout) ptype rUS" }
+ }
+
+
+ send_gdb "ptype rI\n"
+ gdb_expect {
+ -re "type = int &.*$gdb_prompt $" { pass "ptype rI" }
+ -re ".*$gdb_prompt $" { fail "ptype rI" }
+ timeout { fail "(timeout) ptype rI" }
+ }
+
+
+
+ send_gdb "ptype rUI\n"
+ gdb_expect {
+ -re "type = unsigned int &.*$gdb_prompt $" { pass "ptype rUI" }
+ -re ".*$gdb_prompt $" { fail "ptype rUI" }
+ timeout { fail "(timeout) ptype rUI" }
+ }
+
+
+
+ send_gdb "ptype rL\n"
+ gdb_expect {
+ -re "type = long &.*$gdb_prompt $" { pass "ptype rL" }
+ -re "type = long int &.*$gdb_prompt $" { pass "ptype rL" }
+ -re ".*$gdb_prompt $" { fail "ptype rL" }
+ timeout { fail "(timeout) ptype rL" }
+ }
+
+
+ send_gdb "ptype rUL\n"
+ gdb_expect {
+ -re "type = unsigned long &.*$gdb_prompt $" { pass "ptype rUL" }
+ -re "type = long unsigned int &.*$gdb_prompt $" { pass "ptype rUL" }
+ -re ".*$gdb_prompt $" { fail "ptype rUL" }
+ timeout { fail "(timeout) ptype rUL" }
+ }
+
+
+ send_gdb "ptype rF\n"
+ gdb_expect {
+ -re "type = float &.*$gdb_prompt $" { pass "ptype rF" }
+ -re ".*$gdb_prompt $" { fail "ptype rF" }
+ timeout { fail "(timeout) ptype rF" }
+ }
+
+
+ send_gdb "ptype rD\n"
+ gdb_expect {
+ -re "type = double &.*$gdb_prompt $" { pass "ptype rD" }
+ -re ".*$gdb_prompt $" { fail "ptype rD" }
+ timeout { fail "(timeout) ptype rD" }
+ }
+
+
+ send_gdb "print rC\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(char &\\) @$hex: 65 \'A\'.*$gdb_prompt $" {
+ pass "print value of rC"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rC" }
+ timeout { fail "(timeout) print value of rC" }
+ }
+
+
+ send_gdb "print rUC\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(unsigned char &\\) @$hex: 21 \'.025\'.*$gdb_prompt $" {
+ pass "print value of rUC"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rUC" }
+ timeout { fail "(timeout) print value of rUC" }
+ }
+
+
+ send_gdb "print rS\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(short &\\) @$hex: -14.*$gdb_prompt $" {
+ pass "print value of rS"
+ }
+ -re ".\[0-9\]* = \\(short int &\\) @$hex: -14.*$gdb_prompt $" {
+ pass "print value of rS"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rS" }
+ timeout { fail "(timeout) print value of rS" }
+ }
+
+
+ send_gdb "print rUS\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(unsigned short &\\) @$hex: 7.*$gdb_prompt $" {
+ pass "print value of rUS"
+ }
+ -re ".\[0-9\]* = \\(short unsigned int &\\) @$hex: 7.*$gdb_prompt $" {
+ pass "print value of rUS"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rUS" }
+ timeout { fail "(timeout) print value of rUS" }
+ }
+
+
+ send_gdb "print rI\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(int &\\) @$hex: 102.*$gdb_prompt $" {
+ pass "print value of rI"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rI" }
+ timeout { fail "(timeout) print value of rI" }
+ }
+
+
+ send_gdb "print rUI\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002.*$gdb_prompt $" {
+ pass "print value of UI"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rUI" }
+ timeout { fail "(timeout) print value of rUI" }
+ }
+
+
+ send_gdb "print rL\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" {
+ pass "print value of rL"
+ }
+ -re ".\[0-9\]* = \\(long int &\\) @$hex: -234.*$gdb_prompt $" {
+ pass "print value of rL"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rL" }
+ timeout { fail "(timeout) print value of rL" }
+ }
+
+
+
+ send_gdb "print rUL\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(unsigned long &\\) @$hex: 234.*$gdb_prompt $" {
+ pass "print value of rUL"
+ }
+ -re ".\[0-9\]* = \\(long unsigned int &\\) @$hex: 234.*$gdb_prompt $" {
+ pass "print value of rUL"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rUL" }
+ timeout { fail "(timeout) print value of rUL" }
+ }
+
+
+ send_gdb "print rF\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(float &\\) @$hex: 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
+ pass "print value of rF"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rF" }
+ timeout { fail "(timeout) print value of rF" }
+ }
+
+
+ send_gdb "print rD\n"
+ gdb_expect {
+ -re ".\[0-9\]* = \\(double &\\) @$hex: -1.375e-123.*$gdb_prompt $" {
+ pass "print value of rD"
+ }
+ -re ".*$gdb_prompt $" { fail "print value of rD" }
+ timeout { fail "(timeout) print value of rD" }
+ }
+
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types.cc gdb/testsuite/gdb.c++/ref-types.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types.cc Tue Jan 5 15:31:04 1999
--- gdb/testsuite/gdb.c++/ref-types.cc Wed Dec 31 16:00:00 1969
***************
*** 1,30 ****
- void marker1 (void)
- {
-
- }
-
-
-
- int main(void)
- {
- short s;
- short &rs = s;
- short *ps;
- short *&rps = ps;
- short as[4];
- short (&ras)[4] = as;
- s = -1;
- ps = &s;
- as[0] = 0;
- as[1] = 1;
- as[2] = 2;
- as[3] = 3;
-
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
- marker1();
-
- return 0;
- }
--- 0 ----
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types.exp gdb/testsuite/gdb.c++/ref-types.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types.exp Fri Mar 12 18:13:01 1999
--- gdb/testsuite/gdb.c++/ref-types.exp Wed Dec 31 16:00:00 1969
***************
*** 1,278 ****
- # Tests for reference types with short type variables in GDB.
- # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-
- # This program is free software; you can 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
-
- # written by Elena Zannoni (ezannoni@cygnus.com)
-
- if $tracelevel then {
- strace $tracelevel
- }
-
- #
- # test running programs
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "ref-types"
- 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."
- }
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
-
-
- #
- # set it up at a breakpoint so we can play with the variable values
- #
- if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
- }
-
- send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
-
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "up from marker1" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
-
-
- proc gdb_start_again {} {
- global srcdir
- global subdir
- global binfile
- global gdb_prompt
- global decimal
-
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
-
- source ${binfile}.ci
-
- #
- # set it up at a breakpoint so we can play with the variable values
- #
- if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
- }
-
- send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
-
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "up from marker1" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
- }
-
-
-
-
-
- send_gdb "print s\n"
- gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of s"
- }
- -re ".*$gdb_prompt $" { fail "print value of s" }
- timeout { fail "(timeout) print value of s" }
- }
-
-
- send_gdb "ptype s\n"
- gdb_expect {
- -re "type = short.*$gdb_prompt $" { pass "ptype s" }
- -re ".*$gdb_prompt $" { fail "ptype s" }
- timeout { fail "(timeout) ptype s" }
- }
-
-
- send_gdb "print *ps\n"
- gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of ps"
- }
- -re ".*$gdb_prompt $" { fail "print value of ps" }
- timeout { fail "(timeout) print value of ps" }
- }
-
-
- send_gdb "ptype ps\n"
- gdb_expect {
- -re "type = short \*.*$gdb_prompt $" { pass "ptype ps" }
- -re ".*$gdb_prompt $" { fail "ptype ps" }
- timeout { fail "(timeout) ptype ps" }
- }
-
- send_gdb "print as\[0\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 0.*$gdb_prompt $" {
- pass "print value of as\[0\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[0\]" }
- timeout { fail "(timeout) print value of as\[0\]" }
- }
-
-
- send_gdb "ptype as\n"
- gdb_expect {
- -re "type = short \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
- -re "type = short int \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
- -re ".*$gdb_prompt $" { fail "ptype as" }
- timeout { fail "(timeout) ptype as" }
- }
-
- send_gdb "print as\[1\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of as\[1\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[1\]" }
- timeout { fail "(timeout) print value of as\[1\]" }
- }
-
- send_gdb "print as\[2\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of as\[2\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[2\]" }
- timeout { fail "(timeout) print value of as\[2\]" }
- }
-
- send_gdb "print as\[3\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of as\[3\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[3\]" }
- timeout { fail "(timeout) print value of as\[3\]" }
- }
-
- send_gdb "print rs\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(short &\\) @$hex: -1.*$gdb_prompt $" {
- pass "print value of rs"
- }
- -re ".\[0-9\]* = \\(short int &\\) @$hex: -1.*$gdb_prompt $" {
- pass "print value of rs"
- }
- -re ".*$gdb_prompt $" { fail "print value of rs" }
- timeout { fail "(timeout) print value of rs" }
- eof { fail "print rs ($GDB dumped core) (FIXME)" ; gdb_start_again ; }
-
- }
-
- send_gdb "ptype rs\n"
- gdb_expect {
- -re "type = short &.*$gdb_prompt $" { pass "ptype rs" }
- -re "type = short int &.*$gdb_prompt $" { pass "ptype rs" }
- -re ".*$gdb_prompt $" { fail "ptype rs" }
- timeout { fail "(timeout) ptype rs" }
- }
-
-
- send_gdb "print *rps\n"
- gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of *rps"
- }
- -re ".*$gdb_prompt $" { fail "print value of *rps" }
- timeout { fail "(timeout) print value of *rps" }
- }
-
-
- send_gdb "ptype rps\n"
- gdb_expect {
- -re "type = short \\*&.*$gdb_prompt $" { pass "ptype rps" }
- -re "type = short int \\*&.*$gdb_prompt $" { pass "ptype rps" }
- -re ".*$gdb_prompt $" { fail "ptype rps" }
- timeout { fail "(timeout) ptype rps" }
- }
-
-
-
- send_gdb "print ras\[0\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 0.*$gdb_prompt $" {
- pass "print value of ras\[0\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[0\]" }
- timeout { fail "(timeout) print value of ras\[0\]" }
- }
-
-
- send_gdb "ptype ras\n"
- gdb_expect {
- -re "type = short \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
- -re "type = short int \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
- -re ".*$gdb_prompt $" { fail "ptype ras" }
- timeout { fail "(timeout) ptype ras" }
- }
-
- send_gdb "print ras\[1\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of ras\[1\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[1\]" }
- timeout { fail "(timeout) print value of ras\[1\]" }
- }
-
- send_gdb "print ras\[2\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of ras\[2\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[2\]" }
- timeout { fail "(timeout) print value of ras\[2\]" }
- }
-
- send_gdb "print ras\[3\]\n"
- gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of ras\[3\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[3\]" }
- timeout { fail "(timeout) print value of ras\[3\]" }
- }
--- 0 ----
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types2.cc gdb/testsuite/gdb.c++/ref-types2.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types2.cc Tue Jan 5 15:31:04 1999
--- gdb/testsuite/gdb.c++/ref-types2.cc Wed Dec 31 16:00:00 1969
***************
*** 1,47 ****
- int f()
- {
- int f1;
- f1 = 1;
- return f1;
- }
-
- int main(void)
- {
- char C;
- unsigned char UC;
- short S;
- unsigned short US;
- int I;
- unsigned int UI;
- long L;
- unsigned long UL;
- float F;
- double D;
- char &rC = C;
- unsigned char &rUC = UC;
- short &rS = S;
- unsigned short &rUS = US;
- int &rI = I;
- unsigned int &rUI = UI;
- long &rL = L;
- unsigned long &rUL = UL;
- float &rF = F;
- double &rD = D;
- C = 'A';
- UC = 21;
- S = -14;
- US = 7;
- I = 102;
- UI = 1002;
- L = -234;
- UL = 234;
- F = 1.25E10;
- D = -1.375E-123;
- I = f();
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
- return 0;
-
- }
--- 0 ----
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types2.exp gdb/testsuite/gdb.c++/ref-types2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/ref-types2.exp Fri Mar 12 18:13:01 1999
--- gdb/testsuite/gdb.c++/ref-types2.exp Wed Dec 31 16:00:00 1969
***************
*** 1,463 ****
- # Tests for reference types with elementary type variables in GDB.
- # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-
- # This program is free software; you can 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
-
- # written by Elena Zannoni (ezannoni@cygnus.com)
-
- if $tracelevel then {
- strace $tracelevel
- }
-
- #
- # test running programs
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "ref-types2"
- 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."
- }
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
-
-
- #
- # set it up at a breakpoint so we can play with the variable values
- #
- if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
- }
-
- send_gdb "break f\n" ; gdb_expect -re ".*$gdb_prompt $"
-
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* f \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "up from f" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to f" }
- timeout { fail "(timeout) continue to f" }
- }
-
-
- send_gdb "print C\n"
- gdb_expect {
- -re ".\[0-9\]* = 65 \'A\'.*$gdb_prompt $" {
- pass "print value of C"
- }
- -re ".*$gdb_prompt $" { fail "print value of C" }
- timeout { fail "(timeout) print value of C" }
- }
-
-
- send_gdb "ptype C\n"
- gdb_expect {
- -re "type = char.*$gdb_prompt $" { pass "ptype C" }
- -re ".*$gdb_prompt $" { fail "ptype C" }
- timeout { fail "(timeout) ptype C" }
- }
-
-
- send_gdb "print UC\n"
- gdb_expect {
- -re ".\[0-9\]* = 21 '\.025'\.*$gdb_prompt $" {
- pass "print value of UC"
- }
- -re ".*$gdb_prompt $" { fail "print value of UC" }
- timeout { fail "(timeout) print value of UC" }
- }
-
-
- send_gdb "ptype UC\n"
- gdb_expect {
- -re "type = unsigned char.*$gdb_prompt $" { pass "ptype UC" }
- -re ".*$gdb_prompt $" { fail "ptype UC" }
- timeout { fail "(timeout) ptype UC" }
- }
-
-
- send_gdb "print S\n"
- gdb_expect {
- -re ".\[0-9\]* = -14.*$gdb_prompt $" {
- pass "print value of S"
- }
- -re ".*$gdb_prompt $" { fail "print value of S" }
- timeout { fail "(timeout) print value of S" }
- }
-
-
- send_gdb "ptype S\n"
- gdb_expect {
- -re "type = short.*$gdb_prompt $" { pass "ptype S" }
- -re ".*$gdb_prompt $" { fail "ptype S" }
- timeout { fail "(timeout) ptype S" }
- }
-
-
- send_gdb "print US\n"
- gdb_expect {
- -re ".\[0-9\]* = 7.*$gdb_prompt $" {
- pass "print value of US"
- }
- -re ".*$gdb_prompt $" { fail "print value of US" }
- timeout { fail "(timeout) print value of US" }
- }
-
-
- send_gdb "ptype US\n"
- gdb_expect {
- -re "type = unsigned short.*$gdb_prompt $" { pass "ptype US" }
- -re "type = short unsigned.*$gdb_prompt $" { pass "ptype US" }
- -re ".*$gdb_prompt $" { fail "ptype US" }
- timeout { fail "(timeout) ptype US" }
- }
-
-
- send_gdb "print I\n"
- gdb_expect {
- -re ".\[0-9\]* = 102.*$gdb_prompt $" {
- pass "print value of I"
- }
- -re ".*$gdb_prompt $" { fail "print value of I" }
- timeout { fail "(timeout) print value of I" }
- }
-
-
- send_gdb "ptype I\n"
- gdb_expect {
- -re "type = int.*$gdb_prompt $" { pass "ptype I" }
- -re ".*$gdb_prompt $" { fail "ptype I" }
- timeout { fail "(timeout) ptype I" }
- }
-
-
- send_gdb "print UI\n"
- gdb_expect {
- -re ".\[0-9\]* = 1002.*$gdb_prompt $" {
- pass "print value of UI"
- }
- -re ".*$gdb_prompt $" { fail "print value of UI" }
- timeout { fail "(timeout) print value of UI" }
- }
-
-
- send_gdb "ptype UI\n"
- gdb_expect {
- -re "type = unsigned int.*$gdb_prompt $" { pass "ptype UI" }
- -re ".*$gdb_prompt $" { fail "ptype UI" }
- timeout { fail "(timeout) ptype UI" }
- }
-
-
- send_gdb "print L\n"
- gdb_expect {
- -re ".\[0-9\]* = -234.*$gdb_prompt $" {
- pass "print value of L"
- }
- -re ".*$gdb_prompt $" { fail "print value of L" }
- timeout { fail "(timeout) print value of L" }
- }
-
-
- send_gdb "ptype L\n"
- gdb_expect {
- -re "type = long.*$gdb_prompt $" { pass "ptype L" }
- -re ".*$gdb_prompt $" { fail "ptype L" }
- timeout { fail "(timeout) ptype L" }
- }
-
-
- send_gdb "print UL\n"
- gdb_expect {
- -re ".\[0-9\]* = 234.*$gdb_prompt $" {
- pass "print value of UL"
- }
- -re ".*$gdb_prompt $" { fail "print value of UL" }
- timeout { fail "(timeout) print value of UL" }
- }
-
-
- send_gdb "ptype UL\n"
- gdb_expect {
- -re "type = unsigned long.*$gdb_prompt $" { pass "ptype UL" }
- -re "type = long unsigned.*$gdb_prompt $" { pass "ptype UL" }
- -re ".*$gdb_prompt $" { fail "ptype UL" }
- timeout { fail "(timeout) ptype UL" }
- }
-
-
- send_gdb "print F\n"
- gdb_expect {
- -re ".\[0-9\]* = 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
- pass "print value of F"
- }
- -re ".*$gdb_prompt $" { fail "print value of F" }
- timeout { fail "(timeout) print value of F" }
- }
-
-
-
- send_gdb "ptype F\n"
- gdb_expect {
- -re "type = float.*$gdb_prompt $" { pass "ptype F" }
- -re ".*$gdb_prompt $" { fail "ptype F" }
- timeout { fail "(timeout) ptype F" }
- }
-
-
- send_gdb "print D\n"
- gdb_expect {
- -re ".\[0-9\]* = -1.375e-123.*$gdb_prompt $" {
- pass "print value of D"
- }
- -re ".*$gdb_prompt $" { fail "print value of D" }
- timeout { fail "(timeout) print value of D" }
- }
-
-
- send_gdb "ptype D\n"
- gdb_expect {
- -re "type = double.*$gdb_prompt $" { pass "ptype D" }
- -re ".*$gdb_prompt $" { fail "ptype D" }
- timeout { fail "(timeout) ptype D" }
- }
-
-
-
- #
- # test reference types
- #
-
-
-
-
- send_gdb "ptype rC\n"
- gdb_expect {
- -re "type = char &.*$gdb_prompt $" { pass "ptype rC" }
- -re ".*$gdb_prompt $" { fail "ptype rC" }
- timeout { fail "(timeout) ptype rC" }
- }
-
-
-
-
- send_gdb "ptype rUC\n"
- gdb_expect {
- -re "type = unsigned char &.*$gdb_prompt $" { pass "ptype rUC" }
- -re ".*$gdb_prompt $" { fail "ptype rUC" }
- timeout { fail "(timeout) ptype rUC" }
- }
-
-
-
- send_gdb "ptype rS\n"
- gdb_expect {
- -re "type = short &.*$gdb_prompt $" { pass "ptype rS" }
- -re "type = short int &.*$gdb_prompt $" { pass "ptype rS" }
- -re ".*$gdb_prompt $" { fail "ptype rS" }
- timeout { fail "(timeout) ptype rS" }
- }
-
-
-
- send_gdb "ptype rUS\n"
- gdb_expect {
- -re "type = unsigned short &.*$gdb_prompt $" { pass "ptype rUS" }
- -re "type = short unsigned int &.*$gdb_prompt $" { pass "ptype rUS" }
- -re ".*$gdb_prompt $" { fail "ptype rUS" }
- timeout { fail "(timeout) ptype rUS" }
- }
-
-
- send_gdb "ptype rI\n"
- gdb_expect {
- -re "type = int &.*$gdb_prompt $" { pass "ptype rI" }
- -re ".*$gdb_prompt $" { fail "ptype rI" }
- timeout { fail "(timeout) ptype rI" }
- }
-
-
-
- send_gdb "ptype rUI\n"
- gdb_expect {
- -re "type = unsigned int &.*$gdb_prompt $" { pass "ptype rUI" }
- -re ".*$gdb_prompt $" { fail "ptype rUI" }
- timeout { fail "(timeout) ptype rUI" }
- }
-
-
-
- send_gdb "ptype rL\n"
- gdb_expect {
- -re "type = long &.*$gdb_prompt $" { pass "ptype rL" }
- -re "type = long int &.*$gdb_prompt $" { pass "ptype rL" }
- -re ".*$gdb_prompt $" { fail "ptype rL" }
- timeout { fail "(timeout) ptype rL" }
- }
-
-
- send_gdb "ptype rUL\n"
- gdb_expect {
- -re "type = unsigned long &.*$gdb_prompt $" { pass "ptype rUL" }
- -re "type = long unsigned int &.*$gdb_prompt $" { pass "ptype rUL" }
- -re ".*$gdb_prompt $" { fail "ptype rUL" }
- timeout { fail "(timeout) ptype rUL" }
- }
-
-
- send_gdb "ptype rF\n"
- gdb_expect {
- -re "type = float &.*$gdb_prompt $" { pass "ptype rF" }
- -re ".*$gdb_prompt $" { fail "ptype rF" }
- timeout { fail "(timeout) ptype rF" }
- }
-
-
- send_gdb "ptype rD\n"
- gdb_expect {
- -re "type = double &.*$gdb_prompt $" { pass "ptype rD" }
- -re ".*$gdb_prompt $" { fail "ptype rD" }
- timeout { fail "(timeout) ptype rD" }
- }
-
-
- send_gdb "print rC\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(char &\\) @$hex: 65 \'A\'.*$gdb_prompt $" {
- pass "print value of rC"
- }
- -re ".*$gdb_prompt $" { fail "print value of rC" }
- timeout { fail "(timeout) print value of rC" }
- }
-
-
- send_gdb "print rUC\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(unsigned char &\\) @$hex: 21 \'.025\'.*$gdb_prompt $" {
- pass "print value of rUC"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUC" }
- timeout { fail "(timeout) print value of rUC" }
- }
-
-
- send_gdb "print rS\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(short &\\) @$hex: -14.*$gdb_prompt $" {
- pass "print value of rS"
- }
- -re ".\[0-9\]* = \\(short int &\\) @$hex: -14.*$gdb_prompt $" {
- pass "print value of rS"
- }
- -re ".*$gdb_prompt $" { fail "print value of rS" }
- timeout { fail "(timeout) print value of rS" }
- }
-
-
- send_gdb "print rUS\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(unsigned short &\\) @$hex: 7.*$gdb_prompt $" {
- pass "print value of rUS"
- }
- -re ".\[0-9\]* = \\(short unsigned int &\\) @$hex: 7.*$gdb_prompt $" {
- pass "print value of rUS"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUS" }
- timeout { fail "(timeout) print value of rUS" }
- }
-
-
- send_gdb "print rI\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(int &\\) @$hex: 102.*$gdb_prompt $" {
- pass "print value of rI"
- }
- -re ".*$gdb_prompt $" { fail "print value of rI" }
- timeout { fail "(timeout) print value of rI" }
- }
-
-
- send_gdb "print rUI\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002.*$gdb_prompt $" {
- pass "print value of UI"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUI" }
- timeout { fail "(timeout) print value of rUI" }
- }
-
-
- send_gdb "print rL\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" {
- pass "print value of rL"
- }
- -re ".\[0-9\]* = \\(long int &\\) @$hex: -234.*$gdb_prompt $" {
- pass "print value of rL"
- }
- -re ".*$gdb_prompt $" { fail "print value of rL" }
- timeout { fail "(timeout) print value of rL" }
- }
-
-
-
- send_gdb "print rUL\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(unsigned long &\\) @$hex: 234.*$gdb_prompt $" {
- pass "print value of rUL"
- }
- -re ".\[0-9\]* = \\(long unsigned int &\\) @$hex: 234.*$gdb_prompt $" {
- pass "print value of rUL"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUL" }
- timeout { fail "(timeout) print value of rUL" }
- }
-
-
- send_gdb "print rF\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(float &\\) @$hex: 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
- pass "print value of rF"
- }
- -re ".*$gdb_prompt $" { fail "print value of rF" }
- timeout { fail "(timeout) print value of rF" }
- }
-
-
- send_gdb "print rD\n"
- gdb_expect {
- -re ".\[0-9\]* = \\(double &\\) @$hex: -1.375e-123.*$gdb_prompt $" {
- pass "print value of rD"
- }
- -re ".*$gdb_prompt $" { fail "print value of rD" }
- timeout { fail "(timeout) print value of rD" }
- }
-
--- 0 ----
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/templates.cc gdb/testsuite/gdb.c++/templates.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/templates.cc Wed Jun 2 09:28:26 1999
--- gdb/testsuite/gdb.c++/templates.cc Thu Jul 22 17:49:21 1999
***************
*** 516,522 ****
int (*manage[5])(double,
void *(*malloc)(unsigned size),
void (*free)(void *pointer));
! int (*device[5])(int open(const char *, unsigned mode, unsigned perms, int extra = 0),
int *(*read)(int fd, void *place, unsigned size),
int *(*write)(int fd, void *place, unsigned size),
void (*close)(int fd));
--- 516,522 ----
int (*manage[5])(double,
void *(*malloc)(unsigned size),
void (*free)(void *pointer));
! int (*device[5])(int open(const char *, unsigned mode, unsigned perms, int extra),
int *(*read)(int fd, void *place, unsigned size),
int *(*write)(int fd, void *place, unsigned size),
void (*close)(int fd));
***************
*** 716,722 ****
Foo<int> fint;
Foo<char> fchar;
! Foo<volatile char *> fvpchar;
Bar<int, 33> bint;
Bar<int, (4 > 3)> bint2;
--- 716,722 ----
Foo<int> fint;
Foo<char> fchar;
! Foo<volatile char *> fvpchar = {0, 0};
Bar<int, 33> bint;
Bar<int, (4 > 3)> bint2;
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/templates.exp gdb/testsuite/gdb.c++/templates.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/templates.exp Mon Jan 4 14:14:09 1999
--- gdb/testsuite/gdb.c++/templates.exp Thu Jul 22 17:49:21 1999
***************
*** 36,55 ****
}
source ${binfile}.ci
- # if we are on HPUX and we are not compiled with gcc, then skip these tests.
-
- if [istarget hppa*-*-hpux*] {
- if {!$gcc_compiled} {
- continue
- }
- }
-
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."
}
- source ${binfile}.ci
-
#
# Test printing of the types of templates.
#
--- 36,45 ----
***************
*** 63,68 ****
--- 53,60 ----
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5\\<int> & operator=\\(T5<int> const &\\);${ws}T5\\(int\\);${ws}T5\\(T5<int> const &\\);${ws}~T5\\(void\\);${ws}static void \\* operator new\\(unsigned (int|long)\\);${ws}static void operator delete\\(void \\*\\);${ws}int value\\(void\\);${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int>"
}
+ -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void \\*\\);${ws}int value \\(void\\);${ws}\\}${ws}$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned int" }
+ -re "type = class T5<int> \\{.*public:.*static int X;.*int x;.*int val;.*T5 \\(int\\);.*T5 \\(const class T5<int> &\\);.*void ~T5 \\(int\\);.*static void \\* new \\(unsigned long\\);.*static void delete \\(void \\*\\);.*int value \\(void\\);.*\\}\r\n$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned long" }
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5\\<int> & operator=\\(T5<int> const &\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const &\\);)|(${ws}~T5\\(void\\);)|(${ws}static void \\* operator new\\(unsigned (int|long)\\);)|(${ws}static void operator delete\\(void \\*\\);)|(${ws}int value\\(void\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int> (obsolescent gcc or gdb)"
}
***************
*** 76,81 ****
--- 68,79 ----
send_gdb "ptype t5i\n"
gdb_expect {
+ -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5\\(int\\);${ws}T5\\(T5<int> const &\\);${ws}~T5\\(void\\);${ws}static void \\* operator new\\(unsigned int\\);${ws}static void operator delete\\(void \\*\\);${ws}int value\\(void\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype T5<int> -- with several fixes from 4.17" }
+ -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void \\*\\);${ws}int value \\(void\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype t5i<int> -- new with unsigned int" }
+ -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned long\\);${ws}static void delete \\(void \\*\\);${ws}int value \\(void\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype t5i<int> -- new with unsigned long" }
+ -re "type = class T5<int> \{.*public:.*static int X;.*int x;.*int val;.*.*T5 \\(int\\);.*.*void ~T5 \\(int\\).*.*.*int value \\(void\\);.*\}.*$gdb_prompt $" {
+ pass "ptype t5i"
+ }
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5<int> & operator=\\(T5<int> const &\\);${ws}T5\\(int\\);${ws}T5\\(T5<int> const &\\);${ws}~T5\\(void\\);${ws}static void \\* operator new\\(unsigned (int|long)\\);${ws}static void operator delete\\(void \\*\\);${ws}int value\\(void\\);${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i"
}
***************
*** 99,104 ****
--- 97,103 ----
global gdb_prompt
global testfile
global srcdir
+ global hp_aCC_compiler
send_gdb "break T5<int>::T5\n"
gdb_expect {
***************
*** 116,122 ****
default { fail "constructor breakpoint (timeout)" }
}
! gdb_test "break T5<int>::~T5" \
"Breakpoint.*at.* file .*${testfile}.cc, line.*" \
"destructor breakpoint"
--- 115,123 ----
default { fail "constructor breakpoint (timeout)" }
}
! # See CLLbs14792
! if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792}
! gdb_test "break T5<int>::~T5" \
"Breakpoint.*at.* file .*${testfile}.cc, line.*" \
"destructor breakpoint"
***************
*** 133,138 ****
--- 134,140 ----
proc test_template_calls {} {
global gdb_prompt
+ global hp_aCC_compiler
if [target_info exists gdb,cannot_call_functions] {
setup_xfail "*-*-*" 2416
***************
*** 140,153 ****
return
}
send_gdb "print t5i.value()\n"
gdb_expect {
-re ".* = 2\[\r\n\]*$gdb_prompt $" { pass "print t5i.value()" }
-re "Cannot invoke functions on this machine.*$gdb_prompt $" {
fail "print t5i.value()"
}
-re ".*$gdb_prompt $" { fail "print t5i.value()" }
! default { fail "print t5i.value() (timeout)" }
}
}
--- 142,160 ----
return
}
+ if {!$hp_aCC_compiler} {setup_xfail hppa*-*-*}
send_gdb "print t5i.value()\n"
gdb_expect {
-re ".* = 2\[\r\n\]*$gdb_prompt $" { pass "print t5i.value()" }
-re "Cannot invoke functions on this machine.*$gdb_prompt $" {
fail "print t5i.value()"
}
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ xfail "print t5i.value"
+ }
-re ".*$gdb_prompt $" { fail "print t5i.value()" }
! timeout { fail "print t5i.value() (timeout)" }
}
}
***************
*** 200,202 ****
--- 207,424 ----
do_tests
+ if {!$hp_aCC_compiler} {continue}
+
+ # More tests for different kinds of template parameters,
+ # templates with partial specializations, nested templates, etc.
+ # These have been tested only with HP aCC. They probably won't
+ # work with other compilers because of differences in mangling
+ # schemes.
+ # Added by Satish Pai <pai@apollo.hp.com> 1997-09-25
+
+ send_gdb "print fint\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = \\{x = 0, t = 0\\}\r\n$gdb_prompt $" { pass "print fint" }
+ -re "$gdb_prompt $" { fail "print fint" }
+ timeout { fail "(timeout) print fint" }
+ }
+
+ send_gdb "print fvpchar\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = \\{x = 0, t = 0x0\\}\r\n$gdb_prompt $" { pass "print fvpchar" }
+ -re "$gdb_prompt $" { fail "print fvpchar" }
+ timeout { fail "(timeout) print fvpchar" }
+ }
+
+ # Template Foo<T>
+
+ setup_xfail hppa2.0w-*-* CLLbs16092
+ 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" }
+ }
+
+ # ptype Foo<int>
+
+ send_gdb "ptype fint\n"
+ gdb_expect {
+ -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 $" { pass "ptype fint" }
+ -re "$gdb_prompt $" { fail "ptype fint" }
+ timeout { fail "(timeout) ptype fint" }
+ }
+
+ # ptype Foo<char>
+
+ send_gdb "ptype fchar\n"
+ gdb_expect {
+ -re "type = (class |)Foo<char> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char foo\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fchar" }
+ -re "$gdb_prompt $" { fail "ptype fchar" }
+ timeout { fail "(timeout) ptype fchar" }
+ }
+
+ # ptype Foo<volatile char *>
+
+ send_gdb "ptype fvpchar\n"
+ gdb_expect {
+ -re "type = (class |)Foo<volatile char \\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*volatile char \\*t;\r\n\r\n\[ \t\]*volatile char \\* foo\\(int, volatile char \\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
+ -re "$gdb_prompt $" { fail "ptype fvpchar" }
+ timeout { fail "(timeout) ptype fvpchar" }
+ }
+
+ # print a function from Foo<volatile char *>
+
+ send_gdb "print Foo<volatile char *>::foo\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = \\{volatile char \\*\\((class |)Foo<volatile char \\*> \\*, int, volatile char \\*\\)\\} $hex <Foo<volatile char \\*>::foo\\(int, volatile 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" }
+ }
+
+ # Template Bar<T, int>
+
+ setup_xfail hppa2.0w-*-* CLLbs16092
+ 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" }
+ }
+
+
+ # ptype Bar<int,33>
+
+ send_gdb "ptype bint\n"
+ gdb_expect {
+ -re "type = (class |)Bar<int,(\\(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 $" { pass "ptype bint" }
+ -re "$gdb_prompt $" { fail "ptype bint" }
+ timeout { fail "(timeout) ptype bint" }
+ }
+
+ # ptype Bar<int, (4>3)>
+
+ send_gdb "ptype bint2\n"
+ gdb_expect {
+ -re "type = (class |)Bar<int,(\\(int\\)|)1> \\{\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 $" { pass "ptype bint2" }
+ -re "$gdb_prompt $" { fail "ptype bint2" }
+ timeout { fail "(timeout) ptype bint2" }
+ }
+
+ # Template Baz<T, char>
+
+ setup_xfail hppa2.0w-*-* CLLbs16092
+ 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" }
+ }
+
+
+ # ptype Baz<int, 's'>
+
+ send_gdb "ptype bazint\n"
+ gdb_expect {
+ -re "type = (class |)Baz<int,(\\(char\\)|)115> \\{\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 $" { pass "ptype bazint" }
+ -re "$gdb_prompt $" { fail "ptype bazint" }
+ timeout { fail "(timeout) ptype bazint" }
+ }
+
+ # ptype Baz<char, 'a'>
+
+ send_gdb "ptype bazint2\n"
+ gdb_expect {
+ -re "type = (class |)Baz<char,(\\(char\\)|)97> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
+ -re "$gdb_prompt $" { fail "ptype bazint2" }
+ timeout { fail "(timeout) ptype bazint2" }
+ }
+
+ # Template Qux<T, int (*f)(int) >
+
+ 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" }
+ }
+
+ # pt Qux<int,&string>
+
+ send_gdb "ptype quxint\n"
+ gdb_expect {
+ -re "type = class Qux<int,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "$gdb_prompt $" { fail "ptype quxint" }
+ timeout { fail "(timeout) ptype quxint" }
+ }
+
+ # pt Qux<char,0>
+
+ # commented out this as quxint2 declaration was commented out in
+ # templates.exp -- ovidiu
+ # send_gdb "ptype quxint2\n"
+ # gdb_expect {
+ # -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 $" { pass "ptype quxint2" }
+ # -re "$gdb_prompt $" { fail "ptype quxint2" }
+ # timeout { fail "(timeout) ptype quxint2" }
+ # }
+
+ # Template Spec<T1, T2>
+
+ setup_xfail hppa2.0w-*-* CLLbs16092
+ 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" }
+ }
+
+ # pt Spec<char,0>
+
+ send_gdb "ptype siip\n"
+ gdb_expect {
+ -re "type = class Spec<int,int \\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(int \\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
+ -re "$gdb_prompt $" { fail "ptype siip" }
+ timeout { fail "(timeout) ptype siip" }
+ }
+
+ # pt Garply<int>
+
+ send_gdb "ptype Garply<int>\n"
+ gdb_expect {
+ -re "type = class Garply<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int garply\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<int>" }
+ -re "$gdb_prompt $" { fail "ptype Garply<int>" }
+ timeout { fail "(timeout) ptype Garply<int>" }
+ }
+
+ # ptype of nested template name
+
+ send_gdb "ptype Garply<Garply<char> >\n"
+ gdb_expect {
+ -re "type = (class |)Garply<Garply<char> > \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*(class |)Garply<char> t;\r\n\r\n\[ \t\]*(class |)Garply<char> garply\\(int, (class |)Garply<char>\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<Garply<char> >" }
+ -re "$gdb_prompt $" { fail "ptype Garply<Garply<char> >" }
+ timeout { fail "(timeout) ptype Garply<Garply<char> >" }
+ }
+
+ # print out a function from a nested template name
+
+ send_gdb "print Garply<Garply<char> >::garply\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*, int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
+ -re ".*$gdb_prompt $" { fail "print Garply<Garply<char> >::garply" }
+ timeout { fail "print Garply<Garply<char> >::garply (timeout)" }
+ }
+
+ # UNFORTUNATELY, "break Garply<Garply<char> >::garply" doesn't yet work.
+
+ #send_gdb "break Garply<Garply<char> >::garply
+ #gdb_expect {
+ # -re "Breakpoint \[0-9\]* at $hex: file .*templates.cc, line.*\r\n$gdb_prompt $" { pass "break Garply<Garply<char> >::garply" }
+ # -re ".*$gdb_prompt $" { fail "break Garply<Garply<char> >::garply" }
+ # timeout { fail "break Garply<Garply<char> >::garply (timeout)" }
+ #}
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/userdef.exp gdb/testsuite/gdb.c++/userdef.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/userdef.exp Fri Jan 8 16:15:43 1999
--- gdb/testsuite/gdb.c++/userdef.exp Thu Jul 22 17:49:23 1999
***************
*** 68,74 ****
}
! setup_xfail hppa_*_*
send_gdb "print one+two\n"
gdb_expect {
-re "FIXME.*$gdb_prompt $" {
--- 68,74 ----
}
! setup_xfail "hppa*-*-*"
send_gdb "print one+two\n"
gdb_expect {
-re "FIXME.*$gdb_prompt $" {
***************
*** 78,83 ****
--- 78,84 ----
timeout { fail "(timeout) print value of one two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one-two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 87,92 ****
--- 88,94 ----
timeout { fail "(timeout) print value of one - two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one*two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 96,101 ****
--- 98,104 ----
timeout { fail "(timeout) print value of one * two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one/two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 105,110 ****
--- 108,114 ----
timeout { fail "(timeout) print value of one / two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one%two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 114,119 ****
--- 118,124 ----
timeout { fail "(timeout) print value of one % two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one&&two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 123,128 ****
--- 128,134 ----
timeout { fail "(timeout) print value of one && two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one||two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 132,137 ****
--- 138,144 ----
timeout { fail "(timeout) print value of one|| two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one&two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 141,146 ****
--- 148,154 ----
timeout { fail "(timeout) print value of one & two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one|two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 150,155 ****
--- 158,164 ----
timeout { fail "(timeout) print value of one | two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one ^ two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 159,164 ****
--- 168,175 ----
timeout { fail "(timeout) print value of one ^ two" }
}
+
+ setup_xfail "hppa*-*-*"
send_gdb "print one < two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 168,173 ****
--- 179,185 ----
timeout { fail "(timeout) print value of one < two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one <= two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 177,182 ****
--- 189,195 ----
timeout { fail "(timeout) print value of one <= two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one > two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 186,191 ****
--- 199,205 ----
timeout { fail "(timeout) print value of one > two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one >= two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 196,201 ****
--- 210,216 ----
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one==two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 205,210 ****
--- 220,227 ----
timeout { fail "(timeout) print value of one == two" }
}
+
+ setup_xfail "hppa*-*-*"
send_gdb "print one!=two\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 214,219 ****
--- 231,237 ----
timeout { fail "(timeout) print value of one != two" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one<<31\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 223,228 ****
--- 241,247 ----
timeout { fail "(timeout) print value of one<<31" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one>>31\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 232,237 ****
--- 251,257 ----
timeout { fail "(timeout) print value of one>>31" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print !one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 241,246 ****
--- 261,267 ----
timeout { fail "(timeout) print value of !one" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print ~one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 250,255 ****
--- 271,277 ----
timeout { fail "(timeout) print value of ~one" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print -one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 259,264 ****
--- 281,287 ----
timeout { fail "(timeout) print value of -one" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one++\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 268,273 ****
--- 291,297 ----
timeout { fail "(timeout) print value of one++" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print ++one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 277,282 ****
--- 301,307 ----
timeout { fail "(timeout) print value of ++one" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one--\n"
gdb_expect {
-re ".*.FIXME*$gdb_prompt $" {
***************
*** 286,291 ****
--- 311,318 ----
timeout { fail "(timeout) print value of one-->>31" }
}
+
+ setup_xfail "hppa*-*-*"
send_gdb "print --one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 295,300 ****
--- 322,328 ----
timeout { fail "(timeout) print value of --one" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print one+=7\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
***************
*** 304,309 ****
--- 332,338 ----
timeout { fail "(timeout) print value of one+=7" }
}
+ setup_xfail "hppa*-*-*"
send_gdb "print two=one\n"
gdb_expect {
-re ".*FIXME.*$gdb_prompt $" {
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/virtfunc.cc gdb/testsuite/gdb.c++/virtfunc.cc
*** ../gdb-19990719/gdb/testsuite/gdb.c++/virtfunc.cc Wed Dec 2 20:08:14 1998
--- gdb/testsuite/gdb.c++/virtfunc.cc Thu Jul 22 17:49:21 1999
***************
*** 170,176 ****
};
#endif
! main()
{
#ifdef usestubs
set_debug_traps();
--- 170,176 ----
};
#endif
! int main()
{
#ifdef usestubs
set_debug_traps();
***************
*** 182,187 ****
--- 182,189 ----
e.vb = 11;
test_calls();
+ return 0;
+
}
int A::f() {return 1;}
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.c++/virtfunc.exp gdb/testsuite/gdb.c++/virtfunc.exp
*** ../gdb-19990719/gdb/testsuite/gdb.c++/virtfunc.exp Mon Jan 11 07:53:02 1999
--- gdb/testsuite/gdb.c++/virtfunc.exp Thu Jul 22 17:49:21 1999
***************
*** 34,48 ****
return -1
}
- # if we are on HPUX and we are not compiled with gcc, then skip these tests.
-
- if [istarget hppa*-*-hpux*] {
- if {!$gcc_compiled} {
- continue
- }
- }
-
-
# Check to see if we have an executable to test. If not, then either we
# haven't tried to compile one, or the compilation failed for some reason.
--- 34,39 ----
***************
*** 106,111 ****
--- 97,105 ----
-re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}.*$gdb_prompt $" {
pass "ptype VB"
}
+ -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}.*$gdb_prompt $" {
+ pass "ptype VB (aCC)"
+ }
-re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}.*$gdb_prompt $" {
pass "ptype VB (obsolescent gcc or gdb)"
}
***************
*** 122,127 ****
--- 116,124 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype V"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype V (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype V (obsolescent gcc or gdb)"
}
***************
*** 138,143 ****
--- 135,143 ----
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype A"
}
+ -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype A (aCC)"
+ }
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype A (obsolescent gcc or gdb)"
}
***************
*** 161,166 ****
--- 161,169 ----
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype B"
}
+ -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype B (aCC)"
+ }
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype B (obsolescent gcc or gdb)"
}
***************
*** 177,182 ****
--- 180,188 ----
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype C"
}
+ -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype C (aCC)"
+ }
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype C (obsolescent gcc or gdb)"
}
***************
*** 193,198 ****
--- 199,207 ----
-re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype AD"
}
+ -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype AD (aCC)"
+ }
-re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype AD (obsolescent gcc or gdb)"
}
***************
*** 209,214 ****
--- 218,226 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype D"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype D (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype D (obsolescent gcc or gdb)"
}
***************
*** 225,230 ****
--- 237,245 ----
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype E"
}
+ -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype E (aCC)"
+ }
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype E (obsolescent gcc or gdb)"
}
***************
*** 241,246 ****
--- 256,264 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype dd"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype dd (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype dd (obsolescent gcc or gdb)"
}
***************
*** 257,262 ****
--- 275,283 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype ppd"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype ppd (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype ppd (obsolescent gcc or gdb)"
}
***************
*** 273,278 ****
--- 294,302 ----
-re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAd"
}
+ -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pAd (aCC)"
+ }
-re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAd (obsolescent gcc or gdb)"
}
***************
*** 289,294 ****
--- 313,321 ----
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype a"
}
+ -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype a (aCC)"
+ }
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype a (obsolescent gcc or gdb)"
}
***************
*** 305,310 ****
--- 332,340 ----
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype b"
}
+ -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype b (aCC)"
+ }
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype b (obsolescent gcc or gdb)"
}
***************
*** 321,326 ****
--- 351,359 ----
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype c"
}
+ -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
+ pass "ptype c (aCC)"
+ }
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype c (obsolescent gcc or gdb)"
}
***************
*** 337,342 ****
--- 370,378 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype d"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype d (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype d (obsolescent gcc or gdb)"
}
***************
*** 353,358 ****
--- 389,397 ----
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype e"
}
+ -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype e (aCC)"
+ }
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype e (obsolescent gcc or gdb)"
}
***************
*** 369,374 ****
--- 408,416 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype v"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype v (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype v (obsolescent gcc or gdb)"
}
***************
*** 385,390 ****
--- 427,435 ----
-re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}$nl$gdb_prompt $" {
pass "ptype vb"
}
+ -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}$nl$gdb_prompt $" {
+ pass "ptype vb (aCC)"
+ }
-re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
pass "ptype vb (obsolescent gcc or gdb)"
}
***************
*** 401,406 ****
--- 446,454 ----
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAa"
}
+ -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pAa (aCC)"
+ }
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAa (obsolescent gcc or gdb)"
}
***************
*** 417,422 ****
--- 465,473 ----
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAe"
}
+ -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pAe (aCC)"
+ }
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pAe (obsolescent gcc or gdb)"
}
***************
*** 433,438 ****
--- 484,492 ----
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pBe"
}
+ -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pBe (aCC)"
+ }
-re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pBe (obsolescent gcc or gdb)"
}
***************
*** 449,454 ****
--- 503,511 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pDd"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pDd (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pDd (obsolescent gcc or gdb)"
}
***************
*** 465,470 ****
--- 522,530 ----
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pDe"
}
+ -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pDe (aCC)"
+ }
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pDe (obsolescent gcc or gdb)"
}
***************
*** 481,486 ****
--- 541,549 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVa"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pVa (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVa (obsolescent gcc or gdb)"
}
***************
*** 497,502 ****
--- 560,568 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVv"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pVv (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVv (obsolescent gcc or gdb)"
}
***************
*** 513,518 ****
--- 579,587 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVe"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pVe (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVe (obsolescent gcc or gdb)"
}
***************
*** 529,534 ****
--- 598,606 ----
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVd"
}
+ -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pVd (aCC)"
+ }
-re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVd (obsolescent gcc or gdb)"
}
***************
*** 545,550 ****
--- 617,625 ----
-re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pADe"
}
+ -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pADe (aCC)"
+ }
-re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pADe (obsolescent gcc or gdb)"
}
***************
*** 561,566 ****
--- 636,644 ----
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pEe"
}
+ -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pEe (aCC)"
+ }
-re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pEe (obsolescent gcc or gdb)"
}
***************
*** 577,582 ****
--- 655,663 ----
-re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVB"
}
+ -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
+ pass "ptype pVB (aCC)"
+ }
-re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
pass "ptype pVB (obsolescent gcc or gdb)"
}
***************
*** 616,621 ****
--- 697,706 ----
(known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
return 0
}
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pAe->f()"
+ }
-re ".*$gdb_prompt $" { fail "print pAe->f()" }
timeout { fail "print pAe->f() (timeout)" }
eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
***************
*** 624,638 ****
send_gdb "print pAa->f()\n"
gdb_expect {
-re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
-re ".*$gdb_prompt $" { fail "print pAa->f()" }
timeout { fail "print pAa->f() (timeout)" }
eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDe->vg()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
-re ".*$gdb_prompt $" { fail "print pDe->vg()" }
timeout { fail "print pDe->vg() (timeout)" }
eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
--- 709,730 ----
send_gdb "print pAa->f()\n"
gdb_expect {
-re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pAa->f()"
+ }
-re ".*$gdb_prompt $" { fail "print pAa->f()" }
timeout { fail "print pAa->f() (timeout)" }
eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDe->vg()\n"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pDe->vg()"
+ }
-re ".*$gdb_prompt $" { fail "print pDe->vg()" }
timeout { fail "print pDe->vg() (timeout)" }
eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
***************
*** 641,664 ****
send_gdb "print pADe->vg()\n"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
-re ".*$gdb_prompt $" { fail "print pADe->vg()" }
timeout { fail "print pADe->vg() (timeout)" }
eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDd->vg()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
-re ".*$gdb_prompt $" { fail "print pDd->vg()" }
timeout { fail "print pDd->vg() (timeout)" }
eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->vvb()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
-re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
timeout { fail "print pEe->vvb() (timeout)" }
eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
--- 733,766 ----
send_gdb "print pADe->vg()\n"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pADe->vg()"
+ }
-re ".*$gdb_prompt $" { fail "print pADe->vg()" }
timeout { fail "print pADe->vg() (timeout)" }
eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDd->vg()\n"
gdb_expect {
-re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pDd->vg()"
+ }
-re ".*$gdb_prompt $" { fail "print pDd->vg()" }
timeout { fail "print pDd->vg() (timeout)" }
eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pEe->vvb()"
+ }
-re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
timeout { fail "print pEe->vvb() (timeout)" }
eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
***************
*** 667,708 ****
send_gdb "print pVB->vvb()\n"
gdb_expect {
-re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
-re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
timeout { fail "print pVB->vvb() (timeout)" }
eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pBe->vvb()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
-re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
timeout { fail "print pBe->vvb() (timeout)" }
eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDe->vvb()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
-re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
timeout { fail "print pDe->vvb() (timeout)" }
eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->vd()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
-re ".*$gdb_prompt $" { fail "print pEe->vd()" }
timeout { fail "print pEe->vd() (timeout)" }
eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->fvb()\n"
- # setup_xfail "*-*-*"
gdb_expect {
-re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
-re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
timeout { fail "print pEe->fvb() (timeout)" }
eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
--- 769,826 ----
send_gdb "print pVB->vvb()\n"
gdb_expect {
-re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pVB->vvb()"
+ }
-re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
timeout { fail "print pVB->vvb() (timeout)" }
eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pBe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pBe->vvb()"
+ }
-re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
timeout { fail "print pBe->vvb() (timeout)" }
eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pDe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pDe->vvb()"
+ }
-re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
timeout { fail "print pDe->vvb() (timeout)" }
eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->vd()\n"
gdb_expect {
-re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pEe->vd()"
+ }
-re ".*$gdb_prompt $" { fail "print pEe->vd()" }
timeout { fail "print pEe->vd() (timeout)" }
eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
send_gdb "print pEe->fvb()\n"
gdb_expect {
-re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
+ -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
+ setup_xfail hppa*-*-* CLLbs16899
+ fail "print pEe->fvb()"
+ }
-re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
timeout { fail "print pEe->fvb() (timeout)" }
eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }