aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2001-04-23 17:02:05 +0000
committerMichael Chastain <mec@google.com>2001-04-23 17:02:05 +0000
commitdb144853009a9877505330514aec4e26fc591d1d (patch)
tree002283bc86e7c38032500076ea50506cff887b69 /gdb
parentfe4770f47853dcdfbae7206de1380f4617956dd1 (diff)
downloadgdb-db144853009a9877505330514aec4e26fc591d1d.zip
gdb-db144853009a9877505330514aec4e26fc591d1d.tar.gz
gdb-db144853009a9877505330514aec4e26fc591d1d.tar.bz2
2001-04-22 Michael Chastain <chastain@redhat.com>
* gdb.c++/local.exp: Use the 'runto' library function. * gdb.c++/namespace.exp: Likewise. * gdb.c++/overload.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.c++/local.exp28
-rw-r--r--gdb/testsuite/gdb.c++/namespace.exp20
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp26
4 files changed, 26 insertions, 54 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 26a6077..d8afbe5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-22 Michael Chastain <chastain@redhat.com>
+
+ * gdb.c++/local.exp: Use the 'runto' library function.
+ * gdb.c++/namespace.exp: Likewise.
+ * gdb.c++/overload.exp: Likewise.
+
2001-03-26 Kevin Buettner <kevinb@redhat.com>
* gdb.base/Makefile.in (EXECUTABLES): Add step-line.
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
index dae9d37..a93598f 100644
--- a/gdb/testsuite/gdb.c++/local.exp
+++ b/gdb/testsuite/gdb.c++/local.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001 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
@@ -61,25 +61,13 @@ if ![runto_main] then {
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 ".*main.*$gdb_prompt $" {
- pass "up from marker1"
- }
- -re ".*$gdb_prompt $" {
- fail "up from marker1"
- }
- timeout { fail "up from marker1 (timeout)" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
+if ![runto 'marker1'] then {
+ perror "couldn't run to marker1"
+ continue
+}
+
+gdb_test "up" ".*main.*" "up from 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
diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp
index a30ce0c..93f126f 100644
--- a/gdb/testsuite/gdb.c++/namespace.exp
+++ b/gdb/testsuite/gdb.c++/namespace.exp
@@ -68,20 +68,12 @@ if ![runto_main] then {
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 ".*main.*$gdb_prompt $" { pass "up from marker1" }
- -re ".*$gdb_prompt $" { fail "up from marker1" }
- timeout { fail "up from marker1 (timeout)" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
+if ![runto 'marker1'] then {
+ perror "couldn't run to marker1"
+ continue
+}
+
+gdb_test "up" ".*main.*" "up from marker1"
# Access a data item inside a namespace using colons and
# single quotes :-(
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index a56a730..afda692 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001 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
@@ -61,26 +61,12 @@ if ![runto_main] then {
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 ".*main.*$gdb_prompt $" {
- pass "up from marker1"
- }
- -re ".*$gdb_prompt $" {
- fail "up from marker1"
- }
- timeout { fail "up from marker1 (timeout)" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
+if ![runto 'marker1'] then {
+ perror "couldn't run to marker1"
+ continue
+}
+gdb_test "up" ".*main.*" "up from marker1"
send_gdb "print foo_instance1\n"
gdb_expect {