diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/cpexprs.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/cpexprs.exp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp b/gdb/testsuite/gdb.cp/cpexprs.exp index 13af265..1ae7dc0 100644 --- a/gdb/testsuite/gdb.cp/cpexprs.exp +++ b/gdb/testsuite/gdb.cp/cpexprs.exp @@ -719,5 +719,26 @@ foreach name [get_functions list] { } } +# 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 |