diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/location.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.linespec/ls-errs.exp | 3 |
4 files changed, 17 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0347f37..c18160c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2017-12-07 Keith Seitz <keiths@redhat.com> + PR breakpoints/22569 + * location.c (string_to_explicit_location): When terminating + parsing early, break out of enclosing loop instead of returning. + +2017-12-07 Keith Seitz <keiths@redhat.com> + * NEWS (New commands): Mention set/show print type nested-type-limit. * c-typeprint.c (c_type_print_base): Print out nested types. * dwarf2read.c (struct typedef_field_list): Rename to ... diff --git a/gdb/location.c b/gdb/location.c index 6752462..69b7aa4 100644 --- a/gdb/location.c +++ b/gdb/location.c @@ -843,7 +843,7 @@ string_to_explicit_location (const char **argp, Stop parsing and return whatever explicit location was parsed. */ *argp = start; - return location; + break; } *argp = skip_spaces (*argp); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 53f114a..f8fa687 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2017-12-07 Keith Seitz <keiths@redhat.com> + PR breakpoints/22569 + * gdb.linespec/ls-errs.exp: Change expected result of "break + -source this file has spaces.c -line 3". + Check that an explicit source file followed by whitespace is + identified as an invalid explicit location. + +2017-12-07 Keith Seitz <keiths@redhat.com> + * gdb.cp/nested-types.cc: New file. * gdb.cp/nested-types.exp: New file. * lib/cp-support.exp: Load data-structures.exp library. diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp index ee8bb08..a0bcc52 100644 --- a/gdb/testsuite/gdb.linespec/ls-errs.exp +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp @@ -175,7 +175,7 @@ proc do_test {lang} { # 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 "-source this file has spaces.c -line 3" source_incomplete test_break "-function ret_type tmpl_function" \ invalid_function "ret_type tmpl_function" test_break "-source $srcfile -function ret_type tmpl_function" \ @@ -267,6 +267,7 @@ proc do_test {lang} { # Explicit linespec-specific tests test_break "-source $srcfile" source_incomplete + test_break "-source $srcfile main" source_incomplete } foreach_with_prefix lang {"C" "C++"} { |