Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: msnyder@specifix.com, deuling@de.ibm.com,
	gdb-patches@sourceware.org,         uweigand@de.ibm.com
Subject: Re: [patch] Add proper error message instead of gdb_assert
Date: Tue, 04 Mar 2008 04:09:00 -0000	[thread overview]
Message-ID: <umypfi10k.fsf@gnu.org> (raw)
In-Reply-To: <200803032035.m23KZZpQ013528@brahms.sibelius.xs4all.nl> (message 	from Mark Kettenis on Mon, 3 Mar 2008 21:35:35 +0100 (CET))

> Date: Mon, 3 Mar 2008 21:35:35 +0100 (CET)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: deuling@de.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com
> 
> > From: Michael Snyder <msnyder@specifix.com>
> > Date: Mon, 03 Mar 2008 12:28:51 -0800
> > 
> > On Mon, 2008-03-03 at 20:55 +0100, Mark Kettenis wrote:
> > 
> > > 
> > > Sorry, but I don't see why your error message is "proper".  The
> > > gdb_assert() should never fail; the fact that it does means that you
> > > have a bug elsewhere in gdb.
> > 
> > Isn't that what the "internal error" call is for?
> > 
> > The fact that there's a bug somewhere else in gdb is not
> > necessarily a reason to abort the debugging session.
> > It COULD be that severe -- but I don't think we necessarily
> > need to assume it is.
> 
> Sure, that's why we don't use assert(), but have gdb_assert(), which
> calls internal_error() instead of abort.  It's just that gdb_assert()
> results in a slightly different error message (which hopefuly is more
> helpful to the poor soul who actually will be fixing the bug).

I agree with Michael and Markus: a proper error message in plain
English is better in this case.  If the text displayed by gdb_assert
is going to help (though personally I don't see how), we could add
some of it to the error message.


  reply	other threads:[~2008-03-04  4:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 19:37 Markus Deuling
2008-03-03 19:55 ` Mark Kettenis
2008-03-03 20:29   ` Michael Snyder
2008-03-03 20:37     ` Mark Kettenis
2008-03-04  4:09       ` Eli Zaretskii [this message]
2008-03-03 20:39     ` Daniel Jacobowitz
2008-03-03 20:46       ` Markus Deuling
2008-03-03 21:12       ` Markus Deuling
2008-03-03 21:17         ` Daniel Jacobowitz
2008-03-03 20:00 ` Ulrich Weigand
2008-03-03 20:30   ` Michael Snyder
2008-03-03 20:25 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=umypfi10k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=msnyder@specifix.com \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox