From 660fd4696e03e8dc4456c71867d28cbeea7f8466 Mon Sep 17 00:00:00 2001
From: Michael Snyder <msnyder@vmware.com>
Date: Tue, 5 Dec 2000 23:14:40 +0000
Subject: [PATCH] 2000-12-05  Michael Snyder  <msnyder@mvstp600e.cygnus.com>

        * gdb.base/constvars.exp: Test result of "up" command.
        * gdb.base/miscexprs.exp: Ditto.
        * gdb.base/pointers.exp:  Ditto.
        * gdb.base/scope.exp:     Ditto.
        * gdb.c++/derivation.exp: Ditto.
        * gdb.c++/local.exp:      Ditto.
        * gdb.c++/namespace.exp:  Ditto.
        * gdb.c++/overload.exp:   Ditto.
        * gdb.c++/ref-types.exp:  Ditto.
---
 gdb/testsuite/ChangeLog              | 12 ++++++++++++
 gdb/testsuite/gdb.base/constvars.exp | 14 ++++++++++----
 gdb/testsuite/gdb.base/miscexprs.exp |  7 +++++--
 gdb/testsuite/gdb.base/pointers.exp  |  7 +++++--
 gdb/testsuite/gdb.base/scope.exp     | 12 ++++++++----
 gdb/testsuite/gdb.c++/derivation.exp |  7 +++++--
 gdb/testsuite/gdb.c++/local.exp      |  7 +++++--
 gdb/testsuite/gdb.c++/namespace.exp  |  5 +++--
 gdb/testsuite/gdb.c++/overload.exp   |  7 +++++--
 gdb/testsuite/gdb.c++/ref-types.exp  |  7 +++++--
 10 files changed, 63 insertions(+), 22 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8eaedd40635..c90bdc15eac 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2000-12-05  Michael Snyder  <msnyder@mvstp600e.cygnus.com>
+
+	* gdb.base/constvars.exp: Test result of "up" command.
+	* gdb.base/miscexprs.exp: Ditto.
+	* gdb.base/pointers.exp:  Ditto.
+	* gdb.base/scope.exp:     Ditto.
+	* gdb.c++/derivation.exp: Ditto.
+	* gdb.c++/local.exp:      Ditto.
+	* gdb.c++/namespace.exp:  Ditto.
+	* gdb.c++/overload.exp:   Ditto.
+	* gdb.c++/ref-types.exp:  Ditto.
+
 2000-11-22  Michael Chastain  <chastain@redhat.com>
 
 	* mips_pro.exp: Accept either "middle -> top -> main" or
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 312b524a3bb..1cdc231c90e 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -79,16 +79,22 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+		-re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "Break.* marker1__.* \\(\\) at .*:$decimal.*$gdb_prompt $" {
 	    fail "continue to marker1 (demangling)"
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+		-re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp
index f7a5fd26a6e..21f5f0fc76d 100644
--- a/gdb/testsuite/gdb.base/miscexprs.exp
+++ b/gdb/testsuite/gdb.base/miscexprs.exp
@@ -69,8 +69,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+		-re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp
index 539f875b71c..b7cce517439 100644
--- a/gdb/testsuite/gdb.base/pointers.exp
+++ b/gdb/testsuite/gdb.base/pointers.exp
@@ -371,8 +371,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+                -re ".*more_code.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 6c3f9f2f1ad..b4f9936e4c4 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -452,7 +452,7 @@ proc test_at_autovars {} {
 	gdb_suppress_tests;
     }
 
-    if [gdb_test "up" ".*" "" ] { 
+    if [gdb_test "up" ".*autovars.*" "up from marker1 in scope.exp" ] { 
 	gdb_suppress_tests ; 
     }
 
@@ -484,7 +484,7 @@ proc test_at_localscopes {} {
     if [gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"] {
 	gdb_suppress_tests;
     }
-    if [gdb_test "up" ".*" "" ] { 
+    if [gdb_test "up" ".*localscopes.*" "up from marker2 in scopes.exp" ] { 
 	gdb_suppress_tests ; 
     }
 
@@ -499,7 +499,9 @@ proc test_at_localscopes {} {
 
     if [gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \
 	"continue to marker3 in scope.exp"] then { gdb_suppress_tests }
-    if [gdb_test "up" "" "up from marker3 in scope.exp"] then { gdb_suppress_tests }
+    if [gdb_test "up" ".*localscopes.*" "up from marker3 in scope.exp"] { 
+	gdb_suppress_tests 
+    }
 
     # Should be at next (first nested) scope.  Check values.
 
@@ -515,7 +517,9 @@ proc test_at_localscopes {} {
     setup_xfail "a29k-*-udi" 2423
     if [gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \
 	"continue to marker4 in scope.exp"] then { gdb_suppress_tests }
-    if [gdb_test "up" "" "up from marker4 in scope.exp"] then { gdb_suppress_tests }
+    if [gdb_test "up" ".*localscopes.*" "up from marker4 in scope.exp"] {
+	gdb_suppress_tests 
+    }
 
     gdb_test "print localval" " = 30" "print localval, innermost scope"
     gdb_test "print localval1" " = 11" "print localval1, innermost scope"
diff --git a/gdb/testsuite/gdb.c++/derivation.exp b/gdb/testsuite/gdb.c++/derivation.exp
index 0185ce6774b..4b0ff74cf97 100644
--- a/gdb/testsuite/gdb.c++/derivation.exp
+++ b/gdb/testsuite/gdb.c++/derivation.exp
@@ -76,8 +76,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+                -re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
index 10dfabedf43..05588607292 100644
--- a/gdb/testsuite/gdb.c++/local.exp
+++ b/gdb/testsuite/gdb.c++/local.exp
@@ -68,8 +68,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+                -re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp
index 9298c90e79e..16e6e163ade 100644
--- a/gdb/testsuite/gdb.c++/namespace.exp
+++ b/gdb/testsuite/gdb.c++/namespace.exp
@@ -73,8 +73,9 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -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 ".*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"  }
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index e889273d7b4..7b3b1aa3f74 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.exp
@@ -68,8 +68,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+                -re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }
diff --git a/gdb/testsuite/gdb.c++/ref-types.exp b/gdb/testsuite/gdb.c++/ref-types.exp
index a528fd641de..21e8f7b516b 100644
--- a/gdb/testsuite/gdb.c++/ref-types.exp
+++ b/gdb/testsuite/gdb.c++/ref-types.exp
@@ -61,8 +61,11 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
             send_gdb "up\n"
             gdb_expect {
-                -re ".*$gdb_prompt $" {}
-                timeout { fail "up from marker1" }
+                -re ".*main.*$gdb_prompt $" {}
+                -re ".*$gdb_prompt $" {
+		    fail "up from marker1"
+		}
+                timeout { fail "up from marker1 (timeout)" }
             }
         }
         -re "$gdb_prompt $" { fail "continue to marker1"  }