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.
This commit is contained in:
Andrew Cagney
2005-01-14 20:24:20 +00:00
parent 35695fd6e5
commit 05ff989b0b
7 changed files with 68 additions and 92 deletions

View File

@@ -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);
}