This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Remove deprecated_throw_reason from internal_verror.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 30 Jul 2013 20:08:08 +0100
- Subject: Re: [PATCH 1/4] Remove deprecated_throw_reason from internal_verror.
- References: <51F7E51E dot 3070807 at broadcom dot com> <51F7E573 dot 6040001 at broadcom dot com>
On 07/30/2013 05:10 PM, Andrew Burgess wrote:
> Removes the use of deprecated_throw_reason from internal_verror. The user
> will now get an extra "Command aborted" error message in the case where gdb
> hits an internal error, and the user decides not to quit. This feels like
> an improvement to me as it /might/ not be obvious that choosing to continue
> the session will still drop you out of whatever command you were attempting
> at the time. What do you think?
...
> diff --git a/gdb/utils.c b/gdb/utils.c
> index 01212ab..a4ce01c 100644
> --- a/gdb/utils.c
> +++ b/gdb/utils.c
> @@ -831,7 +831,7 @@ void
> internal_verror (const char *file, int line, const char *fmt, va_list ap)
> {
> internal_vproblem (&internal_error_problem, file, line, fmt, ap);
> - deprecated_throw_reason (RETURN_ERROR);
> + throw_error (GENERIC_ERROR, _("Command aborted"));
That error can still be swallowed by a TRY_CATCH somewhere, and the
command might proceed. I think we should throw a RETURN_QUIT instead,
which has exactly that semantic of cancelling the ongoing command.
IOW, I think this should call "fatal" instead.
--
Pedro Alves