2005-01-14 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / linespec.c
index b1f82a74be595a38b578cb29fcae99243c5a9fba..0d853a7555c7a31e37f6411f63ebc2309504eebb 100644 (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);
 }
 
 
This page took 0.024183 seconds and 4 git commands to generate.