aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-04-11 19:57:33 +0000
committerJim Blandy <jimb@codesourcery.com>2003-04-11 19:57:33 +0000
commit93201743fe8d5101d388a4593d31035e2b0901d4 (patch)
treef9c386623cea976e02a13a644e57124049181a34 /gdb/testsuite
parent6913c89ac7bc62da99c5bb292de820098a2bacd2 (diff)
downloadgdb-93201743fe8d5101d388a4593d31035e2b0901d4.zip
gdb-93201743fe8d5101d388a4593d31035e2b0901d4.tar.gz
gdb-93201743fe8d5101d388a4593d31035e2b0901d4.tar.bz2
* gdb.c++/derivation.exp, gdb.c++/overload.exp,
gdb.c++/userdef.cc: Place comments on the lines to which the marker function might return. * gdb.c++/derivation.exp, gdb.c++/overload.exp, gdb.c++/userdef.exp: Look for those comments to check that we've returned to the right place, instead of checking line numbers.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog9
-rw-r--r--gdb/testsuite/gdb.c++/derivation.cc4
-rw-r--r--gdb/testsuite/gdb.c++/derivation.exp2
-rw-r--r--gdb/testsuite/gdb.c++/overload.cc4
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp2
-rw-r--r--gdb/testsuite/gdb.c++/userdef.cc4
-rw-r--r--gdb/testsuite/gdb.c++/userdef.exp2
7 files changed, 18 insertions, 9 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3843177..0bd7b35 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-11 Jim Blandy <jimb@redhat.com>
+
+ * gdb.c++/derivation.exp, gdb.c++/overload.exp,
+ gdb.c++/userdef.cc: Place comments on the lines to which the
+ marker function might return.
+ * gdb.c++/derivation.exp, gdb.c++/overload.exp,
+ gdb.c++/userdef.exp: Look for those comments to check that we've
+ returned to the right place, instead of checking line numbers.
+
2003-04-11 Elena Zannoni <ezannoni@redhat.com>
* gdb.threads/pthreads.exp (test_startup): When setting a breakpoint
diff --git a/gdb/testsuite/gdb.c++/derivation.cc b/gdb/testsuite/gdb.c++/derivation.cc
index 99efa76..f6d42e7 100644
--- a/gdb/testsuite/gdb.c++/derivation.cc
+++ b/gdb/testsuite/gdb.c++/derivation.cc
@@ -214,9 +214,9 @@ int main(void)
#endif
- marker1();
+ marker1(); // marker1-returns-here
- a_instance.a = 20;
+ a_instance.a = 20; // marker1-returns-here
a_instance.aa = 21;
b_instance.b = 22;
b_instance.bb = 23;
diff --git a/gdb/testsuite/gdb.c++/derivation.exp b/gdb/testsuite/gdb.c++/derivation.exp
index 10e3844..38a46a2 100644
--- a/gdb/testsuite/gdb.c++/derivation.exp
+++ b/gdb/testsuite/gdb.c++/derivation.exp
@@ -310,7 +310,7 @@ gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
-re "#0 marker1.*$gdb_prompt $" {
setup_kfail "gdb/1155" s390-*-linux-gnu
fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*derivation.cc:21\[79\].*" \
+ gdb_test "finish" ".*main.*at .*derivation.cc:.*// marker1-returns-here.*" \
"finish call to marker1"
}
-re "#1 ($hex in )?main.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.c++/overload.cc b/gdb/testsuite/gdb.c++/overload.cc
index 2f46715..56afc96 100644
--- a/gdb/testsuite/gdb.c++/overload.cc
+++ b/gdb/testsuite/gdb.c++/overload.cc
@@ -80,8 +80,8 @@ int main ()
// Verify that intToChar should work:
intToChar(1);
- marker1();
- return 0;
+ marker1(); // marker1-returns-here
+ return 0; // marker1-returns-here
}
foo::foo (int i) { ifoo = i; ccpfoo = NULL; }
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index be60250..3e14678 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.exp
@@ -129,7 +129,7 @@ gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
-re "#0 marker1.*$gdb_prompt $" {
setup_kfail "gdb/1155" s390-*-linux-gnu
fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*overload.cc:7\[78\].*" \
+ gdb_test "finish" ".*main.*at .*overload.cc:.*// marker1-returns-here.*" \
"finish call to marker1"
}
-re "#1 ($hex in )?main.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.c++/userdef.cc b/gdb/testsuite/gdb.c++/userdef.cc
index 95a4055..0bb88a2 100644
--- a/gdb/testsuite/gdb.c++/userdef.cc
+++ b/gdb/testsuite/gdb.c++/userdef.cc
@@ -273,8 +273,8 @@ int main (void)
A1 three(0,0);
int val;
- marker1();
- cout << one;
+ marker1(); // marker1-returns-here
+ cout << one; // marker1-returns-here
cout << two;
three = one + two;
cout << "+ " << three;
diff --git a/gdb/testsuite/gdb.c++/userdef.exp b/gdb/testsuite/gdb.c++/userdef.exp
index 9a8fb02..4575249 100644
--- a/gdb/testsuite/gdb.c++/userdef.exp
+++ b/gdb/testsuite/gdb.c++/userdef.exp
@@ -75,7 +75,7 @@ gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
-re "#0 marker1.*$gdb_prompt $" {
setup_kfail "gdb/1155" s390-*-linux-gnu
fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*userdef.cc:27\[67\].*" \
+ gdb_test "finish" ".*main.*at .*userdef.cc:.*// marker1-returns-here.*" \
"finish call to marker1"
}
-re "#1 ($hex in )?main.*$gdb_prompt $" {