mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
gdb/testsuite: resolve remaining duplicate test names in gdb.cp/*.exp
This commit resolves the remaining duplicate test names in gdb.cp/*.exp. These are all the easy duplicates, I'm either giving tests a new, unique name, extending an existing name to make it unique, or changing an existing name to better reflect what the test is actually doing, and thus, making this test name unique. There should be no change in what is tested after this commit. gdb/testsuite/ChangeLog: * 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.
This commit is contained in:
@ -1,3 +1,18 @@
|
||||
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
|
||||
|
@ -51,10 +51,10 @@ set bp_location1 [gdb_get_line_number "conditional breakpoint in method"]
|
||||
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
|
||||
|
@ -43,7 +43,8 @@ if ![runto_main] then {
|
||||
}
|
||||
|
||||
# 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 .*" \
|
||||
@ -184,7 +185,8 @@ if ![runto_main] then {
|
||||
}
|
||||
|
||||
# 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"
|
||||
|
@ -31,14 +31,16 @@ gdb_continue_to_breakpoint "stop inside C"
|
||||
|
||||
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"
|
||||
|
@ -122,7 +122,8 @@ gdb_test "show unwindonsignal" \
|
||||
# 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"
|
||||
@ -135,4 +136,5 @@ gdb_test "show unwindonsignal" \
|
||||
# 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"
|
||||
|
@ -51,13 +51,13 @@ gdb_test "continue" \
|
||||
".*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.*" \
|
||||
|
@ -111,6 +111,6 @@ gdb_test "print 'misc.cc'::v_bool" " = true" \
|
||||
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"
|
||||
|
@ -25,17 +25,20 @@ if ![runto_main] then {
|
||||
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"
|
||||
|
@ -388,13 +388,15 @@ foreach type $all_types {
|
||||
# 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.
|
||||
|
||||
|
@ -31,7 +31,7 @@ gdb_breakpoint [gdb_get_line_number "Break here"]
|
||||
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"
|
||||
|
@ -242,7 +242,7 @@ gdb_test "print rI" ".\[0-9\]* = \\(int &\\) @$hex: 102" \
|
||||
|
||||
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 $" {
|
||||
|
@ -136,7 +136,7 @@ gdb_test "print I" " = 91" "test value of I in func"
|
||||
|
||||
# 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"
|
||||
|
Reference in New Issue
Block a user