+2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.cp/breakpoint.exp: Extend test names to make them unique.
+ * gdb.cp/casts.exp: Give tests unique names.
+ * gdb.cp/filename.exp: Likewise.
+ * gdb.cp/gdb2495.exp: Likewise.
+ * gdb.cp/mb-ctor.exp: Extend test names to make them unique.
+ * gdb.cp/misc.exp: Rename test to make it unique.
+ * gdb.cp/nsnested.exp: Give tests unique names.
+ * gdb.cp/ovldbreak.exp: Likewise.
+ * gdb.cp/pr17494.exp: Rename test to reflect what is actually
+ being tested. This also removes the duplicate test name.
+ * gdb.cp/ref-types.exp: Likewise.
+ * gdb.cp/temargs.exp: Likewise.
+
2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
set bp_location2 [gdb_get_line_number "conditional breakpoint in method 2"]
gdb_test "break $bp_location1 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method"
gdb_test "break $bp_location2 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method 2"
-gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint"
-gdb_test "print i_" "\\\$1 = 3" "check the member variable"
-gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint"
-gdb_test "print i_" "\\\$2 = 3" "check the member variable"
+gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint in C1::foo"
+gdb_test "print i_" "\\\$1 = 3" "check the member variable from within C1::foo"
+gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint in C1::bar"
+gdb_test "print i_" "\\\$2 = 3" "check the member variable from within C1::bar"
gdb_exit
}
# Prevent symbol on address 0x0 being printed.
-gdb_test_no_output "set print symbol off"
+gdb_test_no_output "set print symbol off" \
+ "turn of symbol printing for the first time"
gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
"Breakpoint.*at.* file .*" \
}
# Prevent symbol on address 0x0 being printed.
-gdb_test_no_output "set print symbol off"
+gdb_test_no_output "set print symbol off" \
+ "turn of symbol printing for the second time"
gdb_breakpoint [gdb_get_line_number "casts.exp: 1" $srcfile2]
gdb_continue_to_breakpoint "end of casts03"
gdb_test "print includefile\[0\]" " = 23"
gdb_test "print this->includefile\[0\]" " = 23"
-gdb_test "print 'includefile'::some_global" " = 27"
+gdb_test "print 'includefile'::some_global" " = 27" \
+ "print some_global from within C"
gdb_breakpoint [gdb_get_line_number "stop inside D"]
gdb_continue_to_breakpoint "stop inside D"
gdb_test "print includefile()" " = 24"
gdb_test "print this->includefile()" " = 24"
-gdb_test "print 'includefile'::some_global" " = 27"
+gdb_test "print 'includefile'::some_global" " = 27" \
+ "print some_global from within D"
gdb_breakpoint [gdb_get_line_number "stop outside"]
gdb_continue_to_breakpoint "stop outside"
# Check to see if new behaviour interferes with
# normal signal handling in inferior function calls.
gdb_test "p exceptions.raise_signal(1)" \
- "To change this behavior use \"set unwindonsignal off\".*"
+ "To change this behavior use \"set unwindonsignal off\".*" \
+ "check for unwindonsignal off message"
# And reverse - turn off again.
gdb_test_no_output "set unwindonsignal off"
# Check to see if new behaviour interferes with
# normal signal handling in inferior function calls.
gdb_test "p exceptions.raise_signal(1)" \
- "To change this behavior use \"set unwindonsignal on\".*"
+ "To change this behavior use \"set unwindonsignal on\".*" \
+ "check for unwindonsignal on message"
".*Breakpoint.*Derived.*i=7.*" \
"run to breakpoint 1 v1"
-gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here"
+gdb_continue_to_breakpoint "set breakpoint here, first time" ".* breakpoint here"
gdb_test "continue" \
".*Breakpoint.*Derived.*i=15.*" \
"run to breakpoint 1 v2"
-gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here"
+gdb_continue_to_breakpoint "set breakpoint here, second time" ".* breakpoint here"
gdb_test "continue" \
".*Breakpoint.*~Derived.*" \
gdb_test "print *(v_bool_array + number_ref)" "\\$\[0-9\]* = false" \
"pointer addition with integer reference"
gdb_test "print *(number_ref + v_bool_array)" "\\$\[0-9\]* = false" \
- "pointer addition with integer reference"
+ "integer reference addition with pointer"
gdb_test "print *(v_bool_array - number_ref)" "\\$\[0-9\]* = false" \
"pointer subtraction with integer reference"
continue
}
-gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context." \
+ "ensure symbol ab is not known in main"
############################################
gdb_breakpoint C::first
gdb_continue_to_breakpoint "C::first"
-gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context." \
+ "ensure symbol ab is not known in C::first"
gdb_test "print C::D::ab" "= 11"
############################################
gdb_breakpoint C::D::second
gdb_continue_to_breakpoint "C::D::second"
-gdb_test "print ab" "= 11"
+gdb_test "print ab" "= 11" \
+ "ensure symbol ab is known in C::D::second"
# is set to "cancel"
gdb_test_no_output "set multiple-symbols cancel"
gdb_test "break foo::foofunc" \
- "canceled.*"
+ "canceled.*" \
+ "break on ambiguous symbol when multiple-symbols is set to cancel"
# Test breaking on an overloaded function when multiple-symbols
# is set to "all"
gdb_test_no_output "set multiple-symbols all"
gdb_test "break foo::foofunc" \
- "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*"
+ "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*" \
+ "break on ambiguous symbol when multiple-symbols is set to all"
# That's all, folks.
gdb_continue_to_breakpoint "Break here"
gdb_test "p a.geta()" ".* = 12345" "a.geta()"
-gdb_test "p a_ptr->geta()" ".* = 12345" "a.geta()"
+gdb_test "p a_ptr->geta()" ".* = 12345" "a_ptr->geta()"
gdb_test "p false ? a.geta() : 123" ".* = 123" "ternop 1"
gdb_test "p false ? a_ptr->geta() : 123" ".* = 123" "ternop 2"
gdb_test "print rUI" \
".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002" \
- "print value of UI"
+ "print value of rUI"
gdb_test_multiple "print rL" "print value of rL" {
-re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" {
# PR symtab/16842 - gdb used to crash here.
if $have_older_template_gcc { setup_xfail "*-*-*" }
-gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in templ_m"
+gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in func"
if $have_older_template_gcc { setup_xfail "*-*-*" }
gdb_test "print P == &a_global" " = true" "test value of P in func"