This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Remove deprecated_throw_reason from internal_verror.


On 30/07/2013 8:08 PM, Pedro Alves wrote:
> 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.

Committed with a call to fatal.

Thanks,
Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]