aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.cp/gdb2384.cc4
-rw-r--r--gdb/testsuite/gdb.cp/gdb2384.exp20
3 files changed, 19 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 413cd4c..3fe36b3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb.cp/gdb2384.cc (main): Change comments used for breakpoints.
+ * gdb.cp/gdb2384.exp: Change and extend test names to avoid
+ duplicates, and also to avoid having a string inside parentheses
+ at the end of test names.
+
+2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb.cp/nsusing.exp: Rewrite test, remove a duplicate test block.
Avoid repeated uses of 'runto', and instread just progress once
through the test stopping at different breakpoints. Give comments
diff --git a/gdb/testsuite/gdb.cp/gdb2384.cc b/gdb/testsuite/gdb.cp/gdb2384.cc
index 7c734bd..07967b0 100644
--- a/gdb/testsuite/gdb.cp/gdb2384.cc
+++ b/gdb/testsuite/gdb.cp/gdb2384.cc
@@ -46,7 +46,7 @@ main ()
{
derived1 d1 (42);
derived2 d2 (24);
- g = d1.meth (); // set breakpoint here
- g = d2.meth (); // set breakpoint here (second)
+ g = d1.meth (); // First breakpoint
+ g = d2.meth (); // Second breakpoint
return 0;
}
diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp
index 69f9709..db03206 100644
--- a/gdb/testsuite/gdb.cp/gdb2384.exp
+++ b/gdb/testsuite/gdb.cp/gdb2384.exp
@@ -49,8 +49,8 @@ if ![runto_main] then {
return -1
}
-gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
-gdb_continue_to_breakpoint "set breakpoint here"
+gdb_breakpoint [gdb_get_line_number "First breakpoint"]
+gdb_continue_to_breakpoint "run to 'First breakpoint', first time"
gdb_test "print d1.meth ()" \
".*42.*"
@@ -58,25 +58,25 @@ gdb_test "print d1.meth ()" \
# Now try again. gdb's without the fix will hopefully segv here
runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
-gdb_continue_to_breakpoint "set breakpoint here"
+gdb_breakpoint [gdb_get_line_number "First breakpoint"]
+gdb_continue_to_breakpoint "run to 'First breakpoint', second time"
gdb_test "print d1.meth ()" \
".*42.*" \
- "gdb2384"
+ "gdb2384 at 'First breakpoint'"
# second case
runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here (second)"]
-gdb_continue_to_breakpoint "set breakpoint here (second)"
+gdb_breakpoint [gdb_get_line_number "Second breakpoint"]
+gdb_continue_to_breakpoint "run to 'Second breakpoint', first time"
gdb_test "print d2.meth ()" \
".*24.*" \
"print d2.meth()"
runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here (second)"]
-gdb_continue_to_breakpoint "set breakpoint here (second)"
+gdb_breakpoint [gdb_get_line_number "Second breakpoint"]
+gdb_continue_to_breakpoint "run to 'Second breakpoint', second time"
gdb_test "print d2.meth ()" \
".*24.*" \
- "gdb2384 (second)"
+ "gdb2384 at 'Second breakpoint'"