From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13783 invoked by alias); 12 Jan 2004 15:27:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13776 invoked from network); 12 Jan 2004 15:27:20 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 12 Jan 2004 15:27:20 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 256A71A440D; Mon, 12 Jan 2004 10:25:54 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16386.48257.911663.425776@localhost.redhat.com> Date: Mon, 12 Jan 2004 15:27:00 -0000 To: Jeff Johnston Cc: gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: [RFA]: error_silent for use in pending breakpoint support In-Reply-To: <3FE21F2B.3030104@redhat.com> References: <3FE21F2B.3030104@redhat.com> X-SW-Source: 2004-01/txt/msg00313.txt.bz2 Jeff Johnston writes: > To properly support pending breakpoints, gdb needs to be able to > suppress the "not found" messages at will, but it also needs to > sometimes issue these messages and determine the cause of the error was > a "not found" event. > > To handle the problem, I propose two new useful functions in utils.c. > The first is error_silent() which works just like error(), only it does > not issue the error message. Like error(), it stores the error message > in gdb_lasterr. This leads to the other new function: > error_last_output() which is used to output the last error message. > > This allows the pending breakpoint support to issue the error message > when the user is doing the initial break command and to suppress it when > shared libraries are being loaded or a pending breakpoint is reenabled. > > Ok to commit? > > 2003-12-18 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_last_output): Add prototypes. > * utils.c (error_silent, error_last_output): New functions. > > The linespec.c change depends on the rest being approved. If that happens, this would be ok. elena > Index: linespec.c > =================================================================== > RCS file: /cvs/src/src/gdb/linespec.c,v > retrieving revision 1.53 > diff -u -p -r1.53 linespec.c > --- linespec.c 17 Dec 2003 21:47:47 -0000 1.53 > +++ linespec.c 18 Dec 2003 21:25:08 -0000 > @@ -1469,7 +1469,7 @@ symtab_from_filename (char **argptr, cha > if (not_found_ptr) > { > *not_found_ptr = 1; > - throw_exception (RETURN_ERROR); > + error_silent ("No source file named %s.", copy); > } > error ("No source file named %s.", copy); > } > @@ -1684,7 +1684,7 @@ decode_variable (char *copy, int funfirs > if (not_found_ptr) > { > *not_found_ptr = 1; > - throw_exception (RETURN_ERROR); > + error_silent ("Function \"%s\" not defined.", copy); > } > > error ("Function \"%s\" not defined.", copy);