summaryrefslogtreecommitdiffstats
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-20 02:04:19 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-01-20 02:04:19 +0000
commit4fcef00ad0f7de5a38ce1431e9db564aa3508871 (patch)
treec6c24f8ed847db8e72d197e8dbaaab60bc0e84c3 /gdb/linespec.c
parent53a83a21c7ab484d1e5c3dec1ccb976cbeb50924 (diff)
downloadppe42-binutils-4fcef00ad0f7de5a38ce1431e9db564aa3508871.tar.gz
ppe42-binutils-4fcef00ad0f7de5a38ce1431e9db564aa3508871.zip
2004-01-19 Jeff Johnston <jjohnstn@redhat.com>
* 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.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 741ac88350..e16e96ea16 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);
OpenPOWER on IntegriCloud