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] Add proper error message instead of gdb_assert


On Mon, 2008-03-03 at 21:00 +0100, Ulrich Weigand wrote:
> Markus Deuling wrote:
> 
> > when trying to put > 1 values into an array (fortran subrange) which
> > comes from a register, register_size is called with regnum == -1.
> 
> You need to fix the caller to not do this, then.
> 
> > This patch replaces that gdb_assert by a proper error message before
> > exiting:
> 
> An "internal error" is neither more nor less "proper" than a failed
> assertion.  Both say "there's a bug in GDB", and neither should be
> triggerable by normal user interaction.

Yes, but they're not equivalent.  An assertion failure terminates
the session.  Shouldn't we reserve that for situations that we
can reasonably assume are un-recoverable?



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