Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: abort() to internal_error()
@ 2001-02-16  7:55 Michael Elizabeth Chastain
  2001-02-16  8:36 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Elizabeth Chastain @ 2001-02-16  7:55 UTC (permalink / raw)
  To: ac131313, gdb, kevinb

> (gdb) pwd
> internal_error: /a/b/c/d/foo.c:47: function calls abort ()
> ....

Fine with me.

If this happens on my workstation, I don't care whether I get
internal_error or a core dump or whatever, I'm going to start debugging
gdb either way.

If this happens on a user's desktop, I prefer the "internal_error"
form, because I'll get "/a/b/c/d/foo.c:47" in the bug report.
I imagine the user either won't care, or will prefer internal_error.

I have a side comment: I've gotten two gdb core dumps in the past month.
Both of them are cycles in the type tree which lead to recursive
death in "maint print symbols".  (One was gdb/15, fixed, and the other
is in gdb/7, not analyzed yet).  So you are still going to get core
dumps even after this change.

But that is a separate issue.

Michael


^ permalink raw reply	[flat|nested] 7+ messages in thread
* abort() to internal_error()
@ 2001-02-16  7:09 Andrew Cagney
       [not found] ` <ac131313@cygnus.com>
  2001-02-16 12:08 ` J.T. Conklin
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Cagney @ 2001-02-16  7:09 UTC (permalink / raw)
  To: GDB Discussion, Kevin Buettner

Hello,

KevinB's kindly cooked up a script that will replace all instances of:

	abort ();

with

	internal_error (__FILE__, __LINE__, "function calls abort ()");

Applying and committing this script will signify the end of a very long
campain I've been waging with GDB - to significantly reduce the
likelhood that GDB dumps core.

From memory, this has been discussed several times before (and is listed
in the TODO file).  The only problem I can think of is the message. 
However, if you think about it:

	(gdb) pwd
	internal_error: /a/b/c/d/foo.c:47: function calls abort ()
	....

is still infinatly better than something like

	(gdb) pwd
	Program received SIGXYZZY, core dumped
	$

so I think is good enough,

comments?

	Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-16 12:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-16  7:55 abort() to internal_error() Michael Elizabeth Chastain
2001-02-16  8:36 ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-02-16  7:09 Andrew Cagney
     [not found] ` <ac131313@cygnus.com>
2001-02-16 11:59   ` Kevin Buettner
2001-02-16 12:08 ` J.T. Conklin
2001-02-16 12:16   ` Andrew Cagney
2001-02-16 12:39     ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox