diff options
Diffstat (limited to 'gdb/testsuite/gdb.linespec/ls-errs.exp')
-rw-r--r-- | gdb/testsuite/gdb.linespec/ls-errs.exp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp index 1f78ca6..7942f1f 100644 --- a/gdb/testsuite/gdb.linespec/ls-errs.exp +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp @@ -167,11 +167,14 @@ proc do_test {lang} { test_break "-source $x -line 3" invalid_file [string trim $x \"'] } - # Test that option lexing stops at whitespace boundaries + # Test that option lexing stops at whitespace boundaries, except + # when lexing function names, where we want to handle setting + # breakpoints on e.g., "int template_function<int>()". test_break "-source this file has spaces.c -line 3" invalid_file "this" - test_break "-function function whitespace" invalid_function "function" - test_break "-source $srcfile -function function whitespace" \ - invalid_function_f "function" $srcfile + test_break "-function ret_type tmpl_function" \ + invalid_function "ret_type tmpl_function" + test_break "-source $srcfile -function ret_type tmpl_function" \ + invalid_function_f "ret_type tmpl_function" $srcfile test_break "-function main -label label whitespace" \ invalid_label "label" "main" @@ -232,7 +235,12 @@ proc do_test {lang} { foreach x {"3" "+100" "-100" "foo"} { test_break "main 3" invalid_function "main 3" test_break "-function \"main $x\"" invalid_function "main $x" - test_break "main:here $x" invalid_label "here $x" "main" + if {$x == "foo"} { + test_break "main:here $x" unexpected_opt "string" $x + } else { + test_break "main:here $x" unexpected_opt "number" $x + } + test_break "-function main -label \"here $x\"" \ invalid_label "here $x" "main" } |