diff options
author | Daniel Jacobowitz <drow@false.org> | 2010-02-16 20:51:51 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2010-02-16 20:51:51 +0000 |
commit | 791dfb6488c972e2352ff5c3b4aa5659ce476136 (patch) | |
tree | 8df2dc07b5461cf5d0868edfe205d1538e5e695f /gdb/testsuite | |
parent | 14d1346bd3b6fc51d1144d2060ee1e6822341c5d (diff) | |
download | gdb-791dfb6488c972e2352ff5c3b4aa5659ce476136.zip gdb-791dfb6488c972e2352ff5c3b4aa5659ce476136.tar.gz gdb-791dfb6488c972e2352ff5c3b4aa5659ce476136.tar.bz2 |
gdb/
* linespec.c (decode_line_1): Handle FILE:FUNCTION even if
FUNCTION contains parentheses. Improve removal of a trailing
single quote.
gdb/testsuite/
* gdb.base/list.exp (test_list_filename_and_function): Add test
with single quotes.
* gdb.cp/overload.cc (intToChar): Rewrite onto one line for easy
matching.
* gdb.cp/overload.exp: Add tests with filename, function, and quotes.
Add KFAIL'd tests for PR gdb/11289.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/overload.cc | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/overload.exp | 15 |
4 files changed, 28 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3f10965..2d857f9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com> + * gdb.base/list.exp (test_list_filename_and_function): Add test + with single quotes. + * gdb.cp/overload.cc (intToChar): Rewrite onto one line for easy + matching. + * gdb.cp/overload.exp: Add tests with filename, function, and quotes. + Add KFAIL'd tests for PR gdb/11289. + +2010-02-16 Daniel Jacobowitz <dan@codesourcery.com> + * gdb.cp/cpcompletion.exp: Specify source file name explicitly. 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com> diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index ba3e637..11804c8 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -473,6 +473,9 @@ proc test_list_filename_and_function {} { pass "list filename:function ($testcnt tests)" + # Test with quoting. + gdb_test "list 'list0.c:main'" "int main.*" + # Test some invalid specs # The following test takes the FIXME result on most systems using # DWARF. It fails to notice that main() is not in the file requested. diff --git a/gdb/testsuite/gdb.cp/overload.cc b/gdb/testsuite/gdb.cp/overload.cc index e643d4c..78fae14 100644 --- a/gdb/testsuite/gdb.cp/overload.cc +++ b/gdb/testsuite/gdb.cp/overload.cc @@ -56,10 +56,7 @@ namespace N { int nsoverload (int x, int y) { return x + y; } }; -int intToChar (char c) -{ - return 297; -} +int intToChar (char c) { return 297; } void marker1() {} diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp index 317cbc5..101be4a 100644 --- a/gdb/testsuite/gdb.cp/overload.exp +++ b/gdb/testsuite/gdb.cp/overload.exp @@ -293,6 +293,21 @@ gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \ "int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \ "list overloaded function with function ptr args - quotes around argument" +# Test list with filename. + +gdb_test "list ${srcfile}:intToChar" "int intToChar.*" +gdb_test "list ${srcfile}:intToChar(char)" "int intToChar.*" +gdb_test "list ${srcfile}:'intToChar(char)'" "int intToChar.*" +gdb_test "list '${srcfile}:intToChar(char)'" "int intToChar.*" + +# And with filename and namespace... which does not work. + +setup_kfail *-*-* gdb/11289 +gdb_test "list ${srcfile}:foo::overloadfnarg(int)" "int foo::overloadfnarg" + +setup_kfail *-*-* gdb/11289 +gdb_test "list ${srcfile}:'foo::overloadfnarg(int)'" "int foo::overloadfnarg" + # Now some tests to see how overloading and namespaces interact. gdb_test "print overloadNamespace(1)" ".\[0-9\]* = 1" |