{operation_1<T>::function}
# Start the test
-if {$tracelevel} {
- strace $tracelevel
-}
-
if {[skip_cplus_tests]} { continue }
# On SPU this test fails because the executable exceeds local storage size.
# test running programs
#
-set testfile "cpexprs"
-set srcfile "${testfile}.cc"
-set binfile [file join $objdir $subdir $testfile]
+standard_testfile .cc
-if {[gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
- executable {debug c++}] != "" } {
- untested "$testfile.exp"
+if {[get_compiler_info "c++"]} {
return -1
}
-if {[get_compiler_info $binfile "c++"]} {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir [file join $srcdir $subdir]
-gdb_load $binfile
-
if {![runto_main]} {
perror "couldn't run to breakpoint"
continue
}
}
+# Test c/v gets recognized even without quoting.
+foreach cv {{} { const} { volatile} { const volatile}} {
+ set test "p 'CV::m(int)$cv'"
+ gdb_test_multiple $test $test {
+ -re "( = {.*} 0x\[0-9a-f\]+ <CV::m.*>)\r\n$gdb_prompt $" {
+ # = {void (CV * const, CV::t)} 0x400944 <CV::m(int)>
+ set correct $expect_out(1,string)
+ pass $test
+ }
+ }
+ if {"$cv" != ""} {
+ setup_kfail c++/14186 *-*-*
+ }
+ gdb_test "p CV::m(int)$cv" [string_to_regexp $correct]
+}
+
+# Test TYPENAME:: gets recognized even in parentheses.
+gdb_test "p CV_f(int)" { = {int \(int\)} 0x[0-9a-f]+ <CV_f\(int\)>}
+gdb_test "p CV_f(CV::t)" { = {int \(int\)} 0x[0-9a-f]+ <CV_f\(int\)>}
+gdb_test "p CV_f(CV::i)" " = 43"
+
gdb_exit
return 0