From: Elena Zannoni <ezannoni@redhat.com>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com, Elena Zannoni <ezannoni@redhat.com>
Subject: Re: [RFA]: error_silent for use in pending breakpoint support
Date: Mon, 12 Jan 2004 15:27:00 -0000 [thread overview]
Message-ID: <16386.48257.911663.425776@localhost.redhat.com> (raw)
In-Reply-To: <3FE21F2B.3030104@redhat.com>
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 <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_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);
prev parent reply other threads:[~2004-01-12 15:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 21:42 Jeff Johnston
2004-01-09 18:55 ` J. Johnston
2004-01-11 20:46 ` Andrew Cagney
2004-01-15 23:42 ` J. Johnston
2004-01-19 23:10 ` Andrew Cagney
2004-01-20 2:05 ` J. Johnston
2004-01-12 15:27 ` Elena Zannoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16386.48257.911663.425776@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox