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] Rationalize "fatal" error handling outside of gdbserver


Pedro Alves wrote:
> On 07/23/2014 04:33 PM, Gary Benson wrote:

> > GDB and gdbserver have functions named "fatal" that are used in
> > completely different ways.  In gdbserver "fatal" is used to handle
> > critial errors: it differs from "error" in that "fatal" causes
> 
> "critical"
> 
> > gdbserver to exit whereas "error" does not.  In GDB "fatal" is
> > used to abort the current operation and return to the command
> > level.  This is implemented by throwing a non-error "RETURN_QUIT"
> > exception.
> > 
> > This patch removes GDB's "fatal" and "vfatal" functions entirely.
> > The exception-throwing function "throw_vfatal" is renamed as
> > "throw_vquit", and a new convenience function "throw_quit" is
> > added.  The small number of calls to "fatal" are replaced with
> > calls to "throw_quit", making what is happening more obvious.
> > 
> > This patch also modifies GDB's "throw_error" to call
> > "throw_verror" rather than calling "throw_it" directly.  This
> > change means the assignment of RETURN_ERROR as the exception type
> > now happens in precisely one place in GDB rather than two.
> > 
> > Built and regtested on RHEL6.5 x86_64.
> > 
> > Ok to commit?
> 
> Looks good to me.

Thanks, pushed.

Cheers,
Gary

-- 
http://gbenson.net/


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