gdb/testsuite: resolve duplicate test name in gdb.cp/cplusfuncs.exp

While resolving duplicate test names I spotted that a test in
gdb.cp/cplusfuncs.exp included an unescaped '[]'.  In TCL square
brackets enclose expressions to evaluate, and so in this case, where
there is no enclosed expression, this just evaluates to the empty
string.

This clearly was not what the test intended, so in this commit I have
escaped the square brackets.  This has extended the test coverage.

gdb/testsuite/ChangeLog:

	* gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
	square brackets in test.
This commit is contained in:
Andrew Burgess 2021-03-17 09:39:06 +00:00
parent baecbb3dc8
commit 6b78370dcc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
square brackets in test.
2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.cp/maint.exp (test_first_component): Run more tests with a

View File

@ -497,7 +497,7 @@ proc test_paddr_operator_functions {} {
" = .* $hex <foo::operator new\\\[\\\]\\(.*\\)(| static)>"
print_addr "foo::operator delete($dm_type_void_star)"
print_addr "foo::operator delete[]($dm_type_void_star)"
print_addr "foo::operator delete\[\]($dm_type_void_star)"
print_addr "foo::operator int($dm_type_void)"
print_addr "foo::operator $dm_operator_char_star\($dm_type_void)"