summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-08-31 01:14:27 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-08-31 01:14:27 +0000
commite833b7618213d242416d64171381f774f4353572 (patch)
treecc31f4b800ea8d4816388b9386b36b993c2f016d /gdb/testsuite
parent8ced9d34ff56ac4435c9176617e738a9a715cbd5 (diff)
downloadgdb-e833b7618213d242416d64171381f774f4353572.tar.gz
import gdb-1999-08-30 snapshot
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog39
-rw-r--r--gdb/testsuite/gdb.base/break.exp7
-rw-r--r--gdb/testsuite/gdb.base/display.exp21
-rw-r--r--gdb/testsuite/gdb.base/dollar.exp2
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp4
-rw-r--r--gdb/testsuite/gdb.base/signals.exp2
-rw-r--r--gdb/testsuite/gdb.c++/classes.exp4
-rw-r--r--gdb/testsuite/gdb.c++/derivation.exp9
-rw-r--r--gdb/testsuite/gdb.c++/local.exp7
-rw-r--r--gdb/testsuite/gdb.c++/ovldbreak.exp2
10 files changed, 79 insertions, 18 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 61f62aa1dfd..aa1d60b41da 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,44 @@
+1999-08-25 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdb.base/ending-run.exp: Add Solaris case for what happens when
+ stepping out of main.
+
+ * gdb.c++/derivation.exp: XFAIL inf fn calls for all configs, if
+ G++ used.
+
+ * gdb.c++/local.exp: Expect ptype NestedInnerLocal to succeed
+ always, expect ptype InnerLocal::NestedInnerLocal to fail always.
+
+ * gdb.c++/ovldbreak.exp: Update match string in test that
+ includes a warning of multiple breakpoints.
+
+1999-08-24 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdb.base/display.exp: Improve precision of step-after-finish
+ added yesterday.
+
+ * gdb.base/signals.exp: Add extra wildcard to "handle all print"
+ test.
+
+ * gdb.c++/classes.exp: XFAIL HP-compiler-only tests for all
+ configs when using G++, not just hppa*.
+
+1999-08-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * gdb.base/async.c: New file.
+ * gdb.base/async.exp: New file.
+
+Tue Aug 24 03:24:53 1999 Jeffrey A Law (law@cygnus.com)
+
+ * gdb.base/break.exp: Tweak PA specific tests to properly handle
+ PA64.
+
Mon Aug 23 10:25:20 1999 Jeffrey A Law (law@cygnus.com)
+ * gdb.base/display.exp: "finish" can leave us mid-line on many
+ targets, deal with it. Add a small constant to main, instead of
+ 1000 since main+1000 may not be a valid address in the target.
+
* gdb.base/dollar.exp: Do not run for PA processors in wide mode
on hpux11.
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 115cd803989..454d08b95d1 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -559,9 +559,10 @@ gdb_expect {
if [istarget "hppa*-*-hpux*"] then {
send_gdb "bt\n"
gdb_expect {
- -re "#0\[ \t\]*marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
+ -re "#0\[ \t\]*0x\[0-9\]* in marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
{pass "backtrace while in called function"}
- -re "#0\[ \t\]*marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
+ -re "#0\[ \t\]*0x\[0-9\]* in marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
+
{pass "backtrace while in called function"}
-re "$gdb_prompt $"\
{fail "backtrace while in called function"}
@@ -573,6 +574,8 @@ if [istarget "hppa*-*-hpux*"] then {
{pass "finish from called function"}
-re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*function called from gdb.*$gdb_prompt $"\
{pass "finish from called function"}
+ -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*Value returned.*$gdb_prompt $"\
+ {pass "finish from called function"}
-re "$gdb_prompt $"\
{fail "finish from called function"}
timeout {fail "(timeout) finish from called function"}
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index 98cd73cc285..7a3519ed190 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -130,7 +130,22 @@ gdb_test "c" ".*Breakpoint 4.*" "watch off"
# Now the printf tests
#
-gdb_test "fin" ".*Run till exit.*Value returned is.*= 10.*" "finish"
+# The "finish" command may leave us mid-line in the caller on some
+# targets, including but not limited to the m68k, i386 & PA. So we
+# have to arrange to step until we hit the line with the call to
+# "do_vars".
+send_gdb "finish\n"
+gdb_expect {
+ -re ".*do_loops();.*$gdb_prompt $" {
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re ".*do_vars.*$gdb_prompt $" {
+ pass "finish"
+ }
+ default { fail "finish" ; gdb_suppress_tests; }
+}
+
gdb_test "s" ".*do_vars.*.*27.*"
gdb_test "tb 37" ".*Breakpoint 5 a.*"
gdb_test "c" ".*do_vars.*37.*37.*"
@@ -165,7 +180,9 @@ gdb_test "p/0 j" ".*Item count other than 1 is meaningless.*" "p/0 j"
gdb_test "p/s sum" ".*Format letter.*is meaningless.*" " no s"
gdb_test "p/i sum" ".*Format letter.*is meaningless.*.*" "no i"
gdb_test "p/a &sum" ".*= $hex.*<sum>.*"
-gdb_test "p/a main+1000" ".*= $hex.*<.*>.*"
+# If the constant below is larger than the length of main, then
+# this test will (incorrectly) fail. So use a small number.
+gdb_test "p/a main+4" ".*= $hex.*<.*>.*"
gdb_test "p/a \$pc" ".*= $hex.*<do_vars+.*>.*"
gdb_test "p/a &&j" ".*A parse error.*"
diff --git a/gdb/testsuite/gdb.base/dollar.exp b/gdb/testsuite/gdb.base/dollar.exp
index 1efb9c9a515..a7a977eec70 100644
--- a/gdb/testsuite/gdb.base/dollar.exp
+++ b/gdb/testsuite/gdb.base/dollar.exp
@@ -34,7 +34,7 @@ if ![ istarget "*-*-hpux*" ] then {
# When we are in "wide" mode we do not necessary have $$dyncall as a symbol
# name, which makes all these tests useless
-if ![ istarget "hppa*w-*-hpux11*" ] then {
+if [ istarget "hppa*w-*-hpux11*" ] then {
return
}
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 790a98c06cc..d67af48259b 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -141,6 +141,10 @@ gdb_expect {
-re ".*in.*start.*$gdb_prompt $" {
pass "step out of main"
}
+ -re ".*in .nope ().*$gdb_prompt $" {
+ # This is what happens on Solaris currently -sts 1999-08-25
+ pass "step out of main on Solaris"
+ }
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
pass "step out of main"
}
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index ad875cc1420..adbb95b7223 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -347,7 +347,7 @@ proc test_handle_all_print {} {
|| [istarget "*-*-mach*"] ) } {
gdb_test "handle all print" "Signal\[ \]+Stop\[ \]+Print\[ \]+Pass to program\[ \]+Description\r\nSIGHUP\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Hangup.*SIG63\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Real-time event 63.*EXC_BREAKPOINT\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Breakpoint"
} else {
- gdb_test "handle all print" "Signal\[ \]+Stop\[ \]+Print\[ \]+Pass to program\[ \]+Description\r\nSIGHUP\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Hangup.*SIG63\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Real-time event 63"
+ gdb_test "handle all print" "Signal\[ \]+Stop\[ \]+Print\[ \]+Pass to program\[ \]+Description\r\nSIGHUP\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Hangup.*SIG63\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Real-time event 63.*"
}
set timeout $oldtimeout
verbose "Timeout restored to $timeout seconds" 2
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp
index 445f2e6ad2c..cf6a2cd682b 100644
--- a/gdb/testsuite/gdb.c++/classes.exp
+++ b/gdb/testsuite/gdb.c++/classes.exp
@@ -844,7 +844,7 @@ gdb_expect {
# ptype on the object
# g++ is putting out the wrong debug info. This works with aCC
-if {!$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
+if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "ptype obj_with_enum\n"
gdb_expect {
-re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)ClassWithEnum::PrivEnum priv_enum;\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { pass "ptype obj_with_enum" }
@@ -853,7 +853,7 @@ gdb_expect {
}
# g++ is putting out the wrong debug info. This works with aCC
-if {!$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
+if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
gdb_expect {
-re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
diff --git a/gdb/testsuite/gdb.c++/derivation.exp b/gdb/testsuite/gdb.c++/derivation.exp
index 0ac4ecac0fe..31cdd6f9ac7 100644
--- a/gdb/testsuite/gdb.c++/derivation.exp
+++ b/gdb/testsuite/gdb.c++/derivation.exp
@@ -304,7 +304,10 @@ gdb_expect {
timeout { fail "(timeout) print value of g_instance.c" }
}
-if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
+# The following cases always fail with g++ output, and should be fixed
+# someday. -sts 1999-08-25
+
+if { $gcc_compiled } { setup_xfail "*-*-*" }
send_gdb "print g_instance.afoo()\n"
gdb_expect {
-re ".\[0-9\]* = 1.*$gdb_prompt $" {
@@ -314,7 +317,7 @@ gdb_expect {
timeout { fail "(timeout) print value of g_instance.afoo()" }
}
-if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
+if { $gcc_compiled } { setup_xfail "*-*-*" }
send_gdb "print g_instance.bfoo()\n"
gdb_expect {
-re ".\[0-9\]* = 2.*$gdb_prompt $" {
@@ -324,7 +327,7 @@ gdb_expect {
timeout { fail "(timeout) print value of g_instance.bfoo()" }
}
-if { $gcc_compiled } { setup_xfail "hppa*-hp-hpux*" }
+if { $gcc_compiled } { setup_xfail "*-*-*" }
send_gdb "print g_instance.cfoo()\n"
gdb_expect {
-re ".\[0-9\]* = 3.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
index 03357966306..66b6d63cd91 100644
--- a/gdb/testsuite/gdb.c++/local.exp
+++ b/gdb/testsuite/gdb.c++/local.exp
@@ -116,11 +116,6 @@ gdb_expect {
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" }
@@ -135,7 +130,7 @@ gdb_expect {
# gdb incorrectly interprets the NestedInnerLocal in
# InnerLocal::NestedInnerLocal as field name instead of a type name;
# See CLLbs14784.
-setup_xfail hppa*-*-* CLLbs14784
+setup_xfail *-*-* 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" }
diff --git a/gdb/testsuite/gdb.c++/ovldbreak.exp b/gdb/testsuite/gdb.c++/ovldbreak.exp
index 219182b252d..34f24047817 100644
--- a/gdb/testsuite/gdb.c++/ovldbreak.exp
+++ b/gdb/testsuite/gdb.c++/ovldbreak.exp
@@ -521,7 +521,7 @@ gdb_expect {
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
send_gdb "1\n"
gdb_expect {
- -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nMultiple breakpoints were set.\r\nUse the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
+ -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nwarning: Multiple breakpoints were set.\r\nwarning: Use the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
pass "set bp on all overload1arg()" }
-re ".*$gdb_prompt $" {
fail "set bp on all overload1arg() wrong bp reply" }