diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-14 20:24:20 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-14 20:24:20 +0000 |
commit | 05ff989b0b012d3c83f5908dd9750e01a74cc3de (patch) | |
tree | 01150b5017065db5946397f6128232d7aa5fee3c /gdb/linespec.c | |
parent | 35695fd6e5451726c124a1048a7f260f02cbcd1e (diff) | |
download | gdb-05ff989b0b012d3c83f5908dd9750e01a74cc3de.zip gdb-05ff989b0b012d3c83f5908dd9750e01a74cc3de.tar.gz gdb-05ff989b0b012d3c83f5908dd9750e01a74cc3de.tar.bz2 |
2005-01-14 Andrew Cagney <cagney@gnu.org>
* linespec.c (symtab_from_filename, decode_variable): Use
throw_error instead of error_silent.
* breakpoint.c (do_captured_parse_breakpoint): Change return type
to void.
(break_command_1): Use catch_exception and check the error return
status.
* exceptions.c (throw_error): New function.
(throw_vsilent): Delete function.
* exceptions.h (throw_error): Declare.
(throw_vsilent): Delete declaration.
* utils.c (error_silent): Delete function.
* defs.h (error_silent): Delete declaration.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index b1f82a7..0d853a7 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1,6 +1,7 @@ /* Parser for linespec for the GNU debugger, GDB. - Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, - 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GDB. @@ -35,6 +36,7 @@ #include "block.h" #include "objc-lang.h" #include "linespec.h" +#include "exceptions.h" /* We share this one with symtab.c, but it is not exported widely. */ @@ -1526,18 +1528,8 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed, if (!have_full_symbols () && !have_partial_symbols ()) error ("No symbol table is loaded. Use the \"file\" command."); if (not_found_ptr) - { - *not_found_ptr = 1; - /* The caller has indicated that it wishes quiet notification of any - error where the function or file is not found. A call to - error_silent causes an error to occur, but it does not issue - the supplied message. The message can be manually output by - the caller, if desired. This is used, for example, when - attempting to set breakpoints for functions in shared libraries - that have not yet been loaded. */ - error_silent ("No source file named %s.", copy); - } - error ("No source file named %s.", copy); + *not_found_ptr = 1; + throw_error (NOT_FOUND_ERROR, "No source file named %s.", copy); } /* Discard the file name from the arg. */ @@ -1748,19 +1740,8 @@ decode_variable (char *copy, int funfirstline, char ***canonical, error ("No symbol table is loaded. Use the \"file\" command."); if (not_found_ptr) - { - *not_found_ptr = 1; - /* The caller has indicated that it wishes quiet notification of any - error where the function or file is not found. A call to - error_silent causes an error to occur, but it does not issue - the supplied message. The message can be manually output by - the caller, if desired. This is used, for example, when - attempting to set breakpoints for functions in shared libraries - that have not yet been loaded. */ - error_silent ("Function \"%s\" not defined.", copy); - } - - error ("Function \"%s\" not defined.", copy); + *not_found_ptr = 1; + throw_error (NOT_FOUND_ERROR, "Function \"%s\" not defined.", copy); } |