From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19591 invoked by alias); 4 Mar 2008 04:09:28 -0000 Received: (qmail 19583 invoked by uid 22791); 4 Mar 2008 04:09:27 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (213.8.233.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Mar 2008 04:09:07 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-155-252.inter.net.il [80.230.155.252]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id JJP45299 (AUTH halo1); Tue, 4 Mar 2008 06:06:31 +0200 (IST) Date: Tue, 04 Mar 2008 04:09:00 -0000 Message-Id: From: Eli Zaretskii To: Mark Kettenis CC: msnyder@specifix.com, deuling@de.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com In-reply-to: <200803032035.m23KZZpQ013528@brahms.sibelius.xs4all.nl> (message from Mark Kettenis on Mon, 3 Mar 2008 21:35:35 +0100 (CET)) Subject: Re: [patch] Add proper error message instead of gdb_assert Reply-to: Eli Zaretskii References: <47CC5332.3020700@de.ibm.com> <200803031955.m23Jt7cj019540@brahms.sibelius.xs4all.nl> <1204576131.19253.582.camel@localhost.localdomain> <200803032035.m23KZZpQ013528@brahms.sibelius.xs4all.nl> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00028.txt.bz2 > Date: Mon, 3 Mar 2008 21:35:35 +0100 (CET) > From: Mark Kettenis > CC: deuling@de.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com > > > From: Michael Snyder > > 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.