diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-06-21 13:27:42 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-06-21 13:27:42 +0000 |
commit | 9e0b60a847e443d0120ddd61a479e25ae8fcb83d (patch) | |
tree | e90e7c759d41943a9c008cc4fd49fc613dc4ce8d /gdb/testsuite | |
parent | a8e53fb060baeebbf81fa5c0462effe814dfa1c5 (diff) | |
download | binutils-gdb-9e0b60a847e443d0120ddd61a479e25ae8fcb83d.tar.gz |
import gdb-1999-06-21 snapshot
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 21 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/overload.exp | 61 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 15 |
3 files changed, 92 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2014e7fa044..93630d27034 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,24 @@ +1999-06-18 Stan Shebs <shebs@andros.cygnus.com> + + * gdb.c++/overload.exp: XFAIL everything if using G++, add a + simpler match case for the ptype of the big class. + +1999-06-16 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * gdb.exp: Fix test for gdb_prompt existence. + +1999-06-16 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * gdb.exp (gdb_test): Add fail after calls to perror. + +1999-06-16 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * gdb.exp (gdb_test): Accept variations of Undefined command messages. + +1999-06-16 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * gdb.exp (gdb_test): Fix anchors on gdb_expect statement. + Fri Jun 11 12:56:50 1999 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/call-strs.c (link_malloc): New function. Ensure that diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp index b1ddb16303a..e77d2dc9704 100644 --- a/gdb/testsuite/gdb.c++/overload.exp +++ b/gdb/testsuite/gdb.c++/overload.exp @@ -43,6 +43,12 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb 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 +} gdb_exit gdb_start @@ -87,6 +93,9 @@ 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 $" { pass "ptype foo_instance1 (HP aCC -- known quirk with ~foo parameter list)" } + -re "type = class foo .*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" { + pass "ptype foo_instance1 (shorter match)" + } -re ".*$gdb_prompt $" { fail "ptype foo_instance1" } timeout { fail "(timeout) ptype foo_instance1" } } @@ -110,6 +119,11 @@ gdb_expect { } +# The overload resolver added by HP (valops.c:find_overload_match) doesn't +# 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 { @@ -120,6 +134,9 @@ gdb_expect { timeout { fail "(timeout) print call overloaded func 1 arg" } } + +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2)\n" gdb_expect { -re ".\[0-9\]* = 2\r\n$gdb_prompt $" { @@ -130,6 +147,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3)\n" gdb_expect { -re ".\[0-9\]* = 3\r\n$gdb_prompt $" { @@ -140,6 +159,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4)\n" gdb_expect { -re ".\[0-9\]* = 4\r\n$gdb_prompt $" { @@ -150,6 +171,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5)\n" gdb_expect { -re ".\[0-9\]* = 5\r\n$gdb_prompt $" { @@ -160,6 +183,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)\n" gdb_expect { -re ".\[0-9\]* = 6\r\n$gdb_prompt $" { @@ -170,6 +195,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)\n" gdb_expect { -re ".\[0-9\]* = 7\r\n$gdb_prompt $" { @@ -180,6 +207,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)\n" gdb_expect { -re ".\[0-9\]* = 8\r\n$gdb_prompt $" { @@ -190,6 +219,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)\n" gdb_expect { -re ".\[0-9\]* = 9\r\n$gdb_prompt $" { @@ -200,6 +231,8 @@ gdb_expect { } +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 { -re ".\[0-9\]* = 10\r\n$gdb_prompt $" { @@ -210,6 +243,8 @@ gdb_expect { } +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 { -re ".\[0-9\]* = 11\r\n$gdb_prompt $" { @@ -220,6 +255,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg()\n" gdb_expect { -re ".\[0-9\]* = 1\r\n$gdb_prompt $" { @@ -229,6 +266,9 @@ gdb_expect { timeout { fail "(timeout) print call overloaded func void arg" } } + +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((char)arg2)\n" gdb_expect { -re ".\[0-9\]* = 2\r\n$gdb_prompt $" { @@ -238,6 +278,9 @@ gdb_expect { timeout { fail "(timeout) print call overloaded func char arg" } } + +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((signed char)arg3)\n" gdb_expect { -re ".\[0-9\]* = 3\r\n$gdb_prompt $" { @@ -248,6 +291,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((unsigned char)arg4)\n" gdb_expect { -re ".\[0-9\]* = 4\r\n$gdb_prompt $" { @@ -258,6 +303,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((short)arg5)\n" gdb_expect { -re ".\[0-9\]* = 5\r\n$gdb_prompt $" { @@ -268,6 +315,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n" gdb_expect { -re ".\[0-9\]* = 6\r\n$gdb_prompt $" { @@ -278,6 +327,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((int)arg7)\n" gdb_expect { -re ".\[0-9\]* = 7\r\n$gdb_prompt $" { @@ -288,6 +339,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((unsigned int)arg8)\n" gdb_expect { -re ".\[0-9\]* = 8\r\n$gdb_prompt $" { @@ -298,6 +351,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((long)arg9)\n" gdb_expect { -re ".\[0-9\]* = 9\r\n$gdb_prompt $" { @@ -308,6 +363,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n" gdb_expect { -re ".\[0-9\]* = 10\r\n$gdb_prompt $" { @@ -318,6 +375,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((float)arg11)\n" gdb_expect { -re ".\[0-9\]* = 11\r\n$gdb_prompt $" { @@ -328,6 +387,8 @@ gdb_expect { } +if {$gcc_compiled} then { setup_xfail "*-*-*" } + send_gdb "print foo_instance1.overload1arg((double)arg12)\n" gdb_expect { -re ".\[0-9\]* = 12\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0e9bd2957a7..95ed5348b46 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -56,10 +56,10 @@ if ![info exists GDBFLAGS] { } verbose "using GDBFLAGS = $GDBFLAGS" 2 -# The variable prompt is a regexp which matches the gdb prompt. Set it if it -# is not already set. +# The variable gdb_prompt is a regexp which matches the gdb prompt. +# Set it if it is not already set. global gdb_prompt -if ![info exists prompt] then { +if ![info exists gdb_prompt] then { set gdb_prompt "\[(\]gdb\[)\]" } @@ -414,7 +414,7 @@ proc gdb_test { args } { gdb_suppress_entire_file "GDB died"; return -1; } - -re "Ending remote debugging.*$gdb_prompt$" { + -re "Ending remote debugging.*$gdb_prompt $" { if ![isnative] then { warning "Can`t communicate to remote target." } @@ -432,12 +432,14 @@ proc gdb_test { args } { send_gdb "$response_string\n"; exp_continue; } - -re "Undefined command:.*$gdb_prompt" { + -re "Undefined\[a-z\]* command:.*$gdb_prompt $" { perror "Undefined command \"$command\"." + fail "$message" set result 1 } -re "Ambiguous command.*$gdb_prompt $" { perror "\"$command\" is not a unique command name." + fail "$message" set result 1 } -re "Program exited with code \[0-9\]+.*$gdb_prompt $" { @@ -467,10 +469,12 @@ proc gdb_test { args } { "<return>" { send_gdb "\n" perror "Window too small." + fail "$message" } -re "\\(y or n\\) " { send_gdb "n\n" perror "Got interactive prompt." + fail "$message" } eof { perror "Process no longer exists" @@ -481,6 +485,7 @@ proc gdb_test { args } { } full_buffer { perror "internal buffer is full." + fail "$message" } timeout { if ![string match "" $message] then { |