This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: fatal() -> internal_error() jumbo patch
- To: Andrew Cagney <ac131313@cygnus.com>
- Subject: Re: fatal() -> internal_error() jumbo patch
- From: jtc@redback.com (J.T. Conklin)
- Date: 06 Aug 1999 10:37:37 -0700
- Cc: gdb-patches@sourceware.cygnus.com
- References: <37AAA95E.82DD7B49@cygnus.com>
- Reply-To: jtc@redback.com
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
Andrew> Hello, I'm looking for comments. Mainly on the new function
Andrew> internal_error().
It would have been a little easier had you split out that part of the
patch. It took a bit of time to find amidst the boilerplate changes.
I think the idea is a good one. Although, I must admit I've never
seen fatal() getting tripped in quite some years.
When internal_error() recurses three times, you write() to filedesc 3.
Did you mean 2? Also that case calls then abort(), which has already
failed twice by that point. Perhaps it should call _exit() or some
such, otherwise it may never exit.
Andrew> The new function asks the user before dumping core (quiting
Andrew> GDB) this gives the user a fighting chance of still being able
Andrew> to salvage something from a debug session.
IMO the question about dumping core and continuing should be separate.
I can envision answering yes to dump core and no to quit. That way I
can dump the frotzed state of GDB (for later debugging), yet still try
to recover useful info from my debug session.
--jtc
--
J.T. Conklin
RedBack Networks