aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/mb-ctor.exp4
-rw-r--r--gdb/testsuite/gdb.cp/mb-inline.exp4
-rw-r--r--gdb/testsuite/gdb.cp/mb-templates.exp6
-rw-r--r--gdb/testsuite/gdb.cp/method2.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ovldbreak.exp79
-rw-r--r--gdb/testsuite/gdb.cp/ovsrch.exp22
-rw-r--r--gdb/testsuite/gdb.cp/ovsrch.h4
-rw-r--r--gdb/testsuite/gdb.cp/ovsrch3.cc14
-rw-r--r--gdb/testsuite/gdb.cp/ovsrch4.cc14
-rw-r--r--gdb/testsuite/gdb.cp/re-set-overloaded.exp1
-rw-r--r--gdb/testsuite/gdb.cp/templates.exp30
11 files changed, 108 insertions, 72 deletions
diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp
index 6a99175..0438424 100644
--- a/gdb/testsuite/gdb.cp/mb-ctor.exp
+++ b/gdb/testsuite/gdb.cp/mb-ctor.exp
@@ -50,13 +50,13 @@ if ![runto_main] then {
# and a condition.
gdb_test "break 'Derived::Derived(int)'" \
- "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: Derived::Derived.int.. \\(2 locations\\).*" \
"set-breakpoint at ctor"
gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
gdb_test "break 'Derived::~Derived()'" \
- "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: Derived::~Derived... \\(2 locations\\).*" \
"set-breakpoint at dtor"
gdb_test "continue" \
diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp
index d670b56..05b378c 100644
--- a/gdb/testsuite/gdb.cp/mb-inline.exp
+++ b/gdb/testsuite/gdb.cp/mb-inline.exp
@@ -62,7 +62,7 @@ set bp_location [gdb_get_line_number "set breakpoint here" $hdrfile]
# Set a breakpoint with multiple locations.
gdb_test "break $hdrfile:$bp_location" \
- "Breakpoint.*at.* file .*$hdrfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: $hdrfile:$bp_location. \\(2 locations\\).*" \
"set breakpoint"
gdb_run_cmd
@@ -128,7 +128,7 @@ if { ![runto_main] } {
}
gdb_test "break $hdrfile:$bp_location" \
- "Breakpoint.*at.* file .*$hdrfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: $hdrfile:$bp_location. \\(2 locations\\).*" \
"set multi_line_foo breakpoint"
gdb_test "continue" \
".*Breakpoint.*multi_line_foo \\(i=0\\).*" \
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp
index 80c080b..933d690 100644
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -52,7 +52,7 @@ set bp_location [gdb_get_line_number "set breakpoint here"]
# and a condition.
gdb_test "break $srcfile:$bp_location if i==1" \
- "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
"initial condition: set breakpoint"
gdb_run_cmd
@@ -80,7 +80,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test "break $srcfile:$bp_location" \
- "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
"separate condition: set breakpoint"
gdb_test_no_output "condition 1 i==1" \
@@ -177,7 +177,7 @@ if { ![runto_main] } {
}
gdb_test "break $srcfile:$bp_location" \
- "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \
+ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
"set multi_line_foo breakpoint"
gdb_test "continue" \
".*Breakpoint.*multi_line_foo<int> \\(i=0\\).*" \
diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp
index 2fa4169..29a387d 100644
--- a/gdb/testsuite/gdb.cp/method2.exp
+++ b/gdb/testsuite/gdb.cp/method2.exp
@@ -51,7 +51,7 @@ proc test_break { lang } {
"setting language $lang"
gdb_test_multiple "break A::method" "breaking in method ($lang)" {
- -re ".0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. A::method\\(A\\*\\) at .*\[\r\n\]*.3. A::method\\(int\\) at .*\[\r\n\]*\[\r\n\]*.4. A::method\\(\\) at .*\[\r\n\]*> $" {
+ -re ".0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. .*:A::method\\(A\\*\\)\[\r\n\]*.3. .*:A::method\\(int\\)\[\r\n\]*.4. .*:A::method\\(\\)\[\r\n\]*> $" {
gdb_test "0" \
"canceled" \
"breaking in method ($lang)"
diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp
index f5d4051..f5b41ab 100644
--- a/gdb/testsuite/gdb.cp/ovldbreak.exp
+++ b/gdb/testsuite/gdb.cp/ovldbreak.exp
@@ -130,18 +130,18 @@ proc set_bp_overloaded {name expectedmenu mychoice bpnumber linenumber} {
set menu_overload1arg "\\\[0\\\] cancel\r\n"
append menu_overload1arg "\\\[1\\\] all\r\n"
-append menu_overload1arg "\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n"
-append menu_overload1arg "\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n"
-append menu_overload1arg "\\\[4\\\] foo::overload1arg\\((unsigned long|long unsigned)( int)?\\) at.*$srcfile:119\r\n"
-append menu_overload1arg "\\\[5\\\] foo::overload1arg\\(long( int)?\\) at.*$srcfile:118\r\n"
-append menu_overload1arg "\\\[6\\\] foo::overload1arg\\((unsigned int|unsigned)\\) at.*$srcfile:117\r\n"
-append menu_overload1arg "\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n"
-append menu_overload1arg "\\\[8\\\] foo::overload1arg\\((unsigned short|short unsigned)( int)?\\) at.*$srcfile:115\r\n"
-append menu_overload1arg "\\\[9\\\] foo::overload1arg\\(short( int)?\\) at.*$srcfile:114\r\n"
-append menu_overload1arg "\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n"
-append menu_overload1arg "\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n"
-append menu_overload1arg "\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n"
-append menu_overload1arg "\\\[13\\\] foo::overload1arg\\((void|)\\) at.*$srcfile:110\r\n"
+append menu_overload1arg "\\\[2\\\] .*$srcfile:foo::overload1arg\\(double\\)\r\n"
+append menu_overload1arg "\\\[3\\\] .*$srcfile:foo::overload1arg\\(float\\)\r\n"
+append menu_overload1arg "\\\[4\\\] .*$srcfile:foo::overload1arg\\((unsigned long|long unsigned)( int)?\\)\r\n"
+append menu_overload1arg "\\\[5\\\] .*$srcfile:foo::overload1arg\\(long( int)?\\)\r\n"
+append menu_overload1arg "\\\[6\\\] .*$srcfile:foo::overload1arg\\((unsigned int|unsigned)\\)\r\n"
+append menu_overload1arg "\\\[7\\\] .*$srcfile:foo::overload1arg\\(int\\)\r\n"
+append menu_overload1arg "\\\[8\\\] .*$srcfile:foo::overload1arg\\((unsigned short|short unsigned)( int)?\\)\r\n"
+append menu_overload1arg "\\\[9\\\] .*$srcfile:foo::overload1arg\\(short( int)?\\)\r\n"
+append menu_overload1arg "\\\[10\\\] .*$srcfile:foo::overload1arg\\(unsigned char\\)\r\n"
+append menu_overload1arg "\\\[11\\\] .*$srcfile:foo::overload1arg\\(signed char\\)\r\n"
+append menu_overload1arg "\\\[12\\\] .*$srcfile:foo::overload1arg\\(char\\)\r\n"
+append menu_overload1arg "\\\[13\\\] .*$srcfile:foo::overload1arg\\((void|)\\)\r\n"
append menu_overload1arg "> $"
# Set multiple-symbols to "ask", to allow us to test the use
@@ -279,7 +279,7 @@ gdb_expect {
# Choose all.
send_gdb "1\n"
gdb_expect {
- -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nwarning: Multiple breakpoints were set.\r\nUse the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
+ -re "Breakpoint $decimal at $hex: foo::overload1arg. .12 locations.\r\n.*$gdb_prompt $" {
pass "set bp on overload1arg all"
}
-re ".*$gdb_prompt $" {
@@ -306,18 +306,19 @@ gdb_expect {
gdb_test "info break" \
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned long|long unsigned)( int)?\\) at.*$srcfile:119\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(long( int)?\\) at.*$srcfile:118\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned|unsigned int)\\) at.*$srcfile:117\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(int\\) at.*$srcfile:116\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned short|short unsigned)( int)?\\) at.*$srcfile:115\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(short( int)?\\) at.*$srcfile:114\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((void|)\\) at.*$srcfile:110" \
+\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+<MULTIPLE>\[\t \]*\r
+\[0-9\]+.1\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
+\[0-9\]+.2\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
+\[0-9\]+.3\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned long|long unsigned)( int)?\\) at.*$srcfile:119\r
+\[0-9\]+.4\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(long( int)?\\) at.*$srcfile:118\r
+\[0-9\]+.5\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned|unsigned int)\\) at.*$srcfile:117\r
+\[0-9\]+.6\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(int\\) at.*$srcfile:116\r
+\[0-9\]+.7\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned short|short unsigned)( int)?\\) at.*$srcfile:115\r
+\[0-9\]+.8\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(short( int)?\\) at.*$srcfile:114\r
+\[0-9\]+.9\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
+\[0-9\]+.10\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
+\[0-9\]+.11\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
+\[0-9\]+.12\[\t \]+y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((void|)\\) at.*$srcfile:110" \
"breakpoint info (after setting on all)"
@@ -333,10 +334,10 @@ proc continue_to_bp_overloaded {might_kfail bpnumber argtype actuals} {
send_gdb "continue\n"
gdb_expect {
- -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}(, )?${actuals}\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
+ -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, foo::overload1arg \\(this=${hex}(, )?${actuals}\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
pass "continue to bp overloaded : ${argtype}"
}
- -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}, arg=.*\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
+ -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, foo::overload1arg \\(this=${hex}, arg=.*\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
if $might_kfail {
kfail "gdb/1025" "continue to bp overloaded : ${argtype}"
} else {
@@ -352,17 +353,17 @@ proc continue_to_bp_overloaded {might_kfail bpnumber argtype actuals} {
}
}
-continue_to_bp_overloaded 0 25 "(void|)" ""
-continue_to_bp_overloaded 1 24 "char" "arg=2 \\'\\\\002\\'"
-continue_to_bp_overloaded 1 23 "signed char" "arg=3 \\'\\\\003\\'"
-continue_to_bp_overloaded 1 22 "unsigned char" "arg=4 \\'\\\\004\\'"
-continue_to_bp_overloaded 1 21 "short" "arg=5"
-continue_to_bp_overloaded 1 20 "unsigned short" "arg=6"
-continue_to_bp_overloaded 0 19 "int" "arg=7"
-continue_to_bp_overloaded 0 18 "(unsigned|unsigned int)" "arg=8"
-continue_to_bp_overloaded 0 17 "long" "arg=9"
-continue_to_bp_overloaded 0 16 "unsigned long" "arg=10"
-continue_to_bp_overloaded 0 15 "float" "arg=100"
+continue_to_bp_overloaded 0 14 "(void|)" ""
+continue_to_bp_overloaded 1 14 "char" "arg=2 \\'\\\\002\\'"
+continue_to_bp_overloaded 1 14 "signed char" "arg=3 \\'\\\\003\\'"
+continue_to_bp_overloaded 1 14 "unsigned char" "arg=4 \\'\\\\004\\'"
+continue_to_bp_overloaded 1 14 "short" "arg=5"
+continue_to_bp_overloaded 1 14 "unsigned short" "arg=6"
+continue_to_bp_overloaded 0 14 "int" "arg=7"
+continue_to_bp_overloaded 0 14 "(unsigned|unsigned int)" "arg=8"
+continue_to_bp_overloaded 0 14 "long" "arg=9"
+continue_to_bp_overloaded 0 14 "unsigned long" "arg=10"
+continue_to_bp_overloaded 0 14 "float" "arg=100"
continue_to_bp_overloaded 1 14 "double" "arg=200"
# Test breaking on an overloaded function when multiple-symbols
@@ -375,7 +376,7 @@ gdb_test "break foo::foofunc" \
# is set to "all"
gdb_test_no_output "set multiple-symbols all"
gdb_test "break foo::foofunc" \
- "Breakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nBreakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nwarning: Multiple breakpoints were set\\.\r\nUse the \"delete\" command to delete unwanted breakpoints\\."
+ "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*"
# That's all, folks.
diff --git a/gdb/testsuite/gdb.cp/ovsrch.exp b/gdb/testsuite/gdb.cp/ovsrch.exp
index b509a25..f6ad34b 100644
--- a/gdb/testsuite/gdb.cp/ovsrch.exp
+++ b/gdb/testsuite/gdb.cp/ovsrch.exp
@@ -49,7 +49,7 @@ proc test_class {class} {
# Test whether open parentheses are correctly identified as overload
# information or conditional.
- gdb_test "break ${class}::foo if (a == 3)" "Breakpoint (\[0-9\]).*"
+ gdb_test "break ${class}::hibob if (a_param == 3)" "Breakpoint (\[0-9\]).*"
}
if { [skip_cplus_tests] } { continue }
@@ -73,28 +73,28 @@ if {![runto_main]} {
}
# Break in A::stop_here and run tests.
-if {[gdb_breakpoint "stop_here"]} {
- pass "break stop_here"
+if {[gdb_breakpoint "A::stop_here"]} {
+ pass "break A::stop_here"
}
-if {[gdb_breakpoint "'stop_here'"]} {
- pass "break 'stop_here'"
+if {[gdb_breakpoint "'A::stop_here'"]} {
+ pass "break 'A::stop_here'"
}
gdb_continue_to_breakpoint "stop_here"
-test_class outer
+test_class A::outer
# Break in A::B::stop_here_too and run tests.
-if {[gdb_breakpoint "B::stop_here_too"]} {
- pass "break B::stop_here_too"
+if {[gdb_breakpoint "A::B::stop_here_too"]} {
+ pass "break A::B::stop_here_too"
}
-if {[gdb_breakpoint "'B::stop_here_too'"]} {
- pass "break 'B::stop_here_too'"
+if {[gdb_breakpoint "'A::B::stop_here_too'"]} {
+ pass "break 'A::B::stop_here_too'"
}
gdb_continue_to_breakpoint "stop_here_too"
-test_class inner
+test_class A::B::inner
gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.cp/ovsrch.h b/gdb/testsuite/gdb.cp/ovsrch.h
index b2e518d..983b51e 100644
--- a/gdb/testsuite/gdb.cp/ovsrch.h
+++ b/gdb/testsuite/gdb.cp/ovsrch.h
@@ -24,6 +24,8 @@ namespace A
void foo (int) const;
void foo (char *) const;
bool func (void) { return true; }
+ void hibob (int) const;
+ void hibob (char *) const;
};
namespace B
@@ -34,6 +36,8 @@ namespace A
void foo (void) const;
void foo (int) const;
void foo (char *) const;
+ void hibob (int) const;
+ void hibob (char *) const;
};
}
}
diff --git a/gdb/testsuite/gdb.cp/ovsrch3.cc b/gdb/testsuite/gdb.cp/ovsrch3.cc
index e6e38a4..a7d9551 100644
--- a/gdb/testsuite/gdb.cp/ovsrch3.cc
+++ b/gdb/testsuite/gdb.cp/ovsrch3.cc
@@ -18,11 +18,21 @@
#include "ovsrch.h"
void
-A::outer::foo (int a) const
+A::outer::foo (int a_param) const
{
}
void
-A::B::inner::foo (int a) const
+A::B::inner::foo (int a_param) const
+{
+}
+
+void
+A::outer::hibob (int a_param) const
+{
+}
+
+void
+A::B::inner::hibob (int a_param) const
{
}
diff --git a/gdb/testsuite/gdb.cp/ovsrch4.cc b/gdb/testsuite/gdb.cp/ovsrch4.cc
index 2f0c1a6..5bb08b3 100644
--- a/gdb/testsuite/gdb.cp/ovsrch4.cc
+++ b/gdb/testsuite/gdb.cp/ovsrch4.cc
@@ -18,11 +18,21 @@
#include "ovsrch.h"
void
-A::outer::foo (char *a) const
+A::outer::foo (char *a_param) const
{
}
void
-A::B::inner::foo (char *a) const
+A::B::inner::foo (char *a_param) const
+{
+}
+
+void
+A::outer::hibob (char *a_param) const
+{
+}
+
+void
+A::B::inner::hibob (char *a_param) const
{
}
diff --git a/gdb/testsuite/gdb.cp/re-set-overloaded.exp b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
index 2052552..bd5f3ba 100644
--- a/gdb/testsuite/gdb.cp/re-set-overloaded.exp
+++ b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
@@ -46,7 +46,6 @@ gdb_test_no_output {set variable $brk = $bpnum}
# runto or runto_main would call delete_breakpoints.
gdb_breakpoint "main"
gdb_run_cmd
-setup_kfail breakpoints/11657 *-*-*
gdb_test "" ".*" "start"
set test "breakpoint resolved"
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 6612b4a..59e9476 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -109,12 +109,7 @@ proc test_template_breakpoints {} {
global hp_aCC_compiler
gdb_test_multiple "break T5<int>::T5" "constructor breakpoint" {
- -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5<int>::T5\\(int\\) at .*\[\r\n\]*.3. T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\) at .*\[\r\n\]*> $" {
- gdb_test "0" \
- "canceled" \
- "constructor breakpoint (obsolete format!)"
- }
- -re ".0. cancel\[\r\n\]*.1. all\[\r\n\]*.2. T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\) at .*templates.cc:.*\[\r\n\]*.3. T5<int>::T5\\(int\\) at .*templates.cc:.*\[\r\n\]*> $" {
+ -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2.*templates.cc:T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\)\[\r\n\]*.3.*templates.cc:T5<int>::T5\\(int\\)\[\r\n\]*> $" {
gdb_test "0" \
"canceled" \
"constructor breakpoint"
@@ -152,9 +147,26 @@ proc test_template_breakpoints {} {
set bp_location [gdb_get_line_number \
"set breakpoint on a line with no real code"]
- gdb_test "break ${testfile}.cc:${bp_location}" \
- "Breakpoint.*at.* file .*${testfile}.cc, line.*(2 locations).*" \
- "breakpoint on a line with no real code"
+
+ gdb_test_multiple "break ${testfile}.cc:${bp_location}" \
+ "breakpoint on a line with no real code" {
+ -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2.*templates.cc:GetMax<int>\\(int, int\\)\[\r\n\]*.3.*templates.cc:GetMax<long>\\(long, long\\)\[\r\n\]*> $" {
+ gdb_test "0" \
+ "canceled" \
+ "breakpoint on a line with no real code"
+ }
+ -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2.*\[\r\n\]*.3.*\[\r\n\]*> $" {
+ gdb_test "0" \
+ "nonsense intended to insure that this test fails" \
+ "breakpoint on a line with no real code"
+ }
+ -re ".*\n> $" {
+ gdb_test "0" \
+ "nonsense intended to insure that this test fails" \
+ "breakpoint on a line with no real code"
+ }
+ }
+
delete_breakpoints
}