diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 148219e..969f31d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2010-06-25 Justin Lebar + + * linespec.c (decode_variable): Passing a non-null not_found_ptr + prevents an error from being thrown if the function cannot be found. + * breakpoint.c (create_breakpoint): Pass a null not_found_ptr to + decode_variable so we get an exception when a function cannot be + found, as desired. + 2010-04-24 Pedro Alves * defs.h: Adjust comment. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3dca17e..74838e8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7336,7 +7336,6 @@ create_breakpoint (struct gdbarch *gdbarch, struct captured_parse_breakpoint_args parse_args; int i; int pending = 0; - int not_found = 0; enum bptype type_wanted; int task = 0; int prev_bkpt_count = breakpoint_count; @@ -7348,7 +7347,7 @@ create_breakpoint (struct gdbarch *gdbarch, parse_args.arg_p = &arg; parse_args.sals_p = &sals; parse_args.addr_string_p = &addr_string; - parse_args.not_found_ptr = ¬_found; + parse_args.not_found_ptr = 0; e = catch_exception (uiout, do_captured_parse_breakpoint, &parse_args, RETURN_MASK_ALL); diff --git a/gdb/linespec.c b/gdb/linespec.c index c5ea28a..19727b5 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1857,7 +1857,13 @@ decode_variable (char *copy, int funfirstline, char ***canonical, return minsym_found (funfirstline, msymbol); if (not_found_ptr) - *not_found_ptr = 1; + { + struct symtabs_and_lines sals; + *not_found_ptr = 1; + sals.sals = 0; + sals.nelts = 0; + return sals; + } if (!have_full_symbols () && !have_partial_symbols ()