From 4fcef00ad0f7de5a38ce1431e9db564aa3508871 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 20 Jan 2004 02:04:19 +0000 Subject: 2004-01-19 Jeff Johnston * linespec.c (decode_variable, symtab_from_filename): Call error_silent with error message instead of throwing an exception directly. * defs.h (error_silent, error_output_message): Add prototypes. (catch_exceptions_with_msg): Ditto. * utils.c (error_silent, error_output_message): New functions. * top.c (catch_exceptions_with_msg): New function. --- gdb/linespec.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'gdb/linespec.c') diff --git a/gdb/linespec.c b/gdb/linespec.c index 741ac88..e16e96e 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1,6 +1,6 @@ /* 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 + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -1469,7 +1469,14 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed, if (not_found_ptr) { *not_found_ptr = 1; - throw_exception (RETURN_ERROR); + /* 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); } @@ -1684,7 +1691,14 @@ decode_variable (char *copy, int funfirstline, char ***canonical, if (not_found_ptr) { *not_found_ptr = 1; - throw_exception (RETURN_ERROR); + /* 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); -- cgit v1.1