This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: internal_error() change + abort()
- To: Michael Snyder <msnyder at redhat dot com>
- Subject: Re: RFC: internal_error() change + abort()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 25 Jul 2000 10:37:43 +1000
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- References: <397BA3FB.51AE0049@cygnus.com> <397C8862.2589@redhat.com>
Michael Snyder wrote:
> How do you decide when it's safe to NOT abort?
> Eg. if a malloc call fails, you're probably completely
> out of virtual memory. Are you sure printf will work
> under such a circumstance?
Internal error asks for permission to abort. If the user really does
want to continue they can (but they have been warned :-).
internal_error() its self keeps an eye out for a re-entrant call (say
the printf failed) and will do a write() abort() in that case.
Of course, a lack of stack space is always fatal :-)
Andrew