From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25338 invoked by alias); 3 Mar 2008 20:30:50 -0000 Received: (qmail 25328 invoked by uid 22791); 3 Mar 2008 20:30:50 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Mar 2008 20:30:32 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 35F413BF88; Mon, 3 Mar 2008 12:30:31 -0800 (PST) Subject: Re: [patch] Add proper error message instead of gdb_assert From: Michael Snyder To: Ulrich Weigand Cc: Markus Deuling , GDB Patches In-Reply-To: <200803032000.m23K00SA027858@d12av02.megacenter.de.ibm.com> References: <200803032000.m23K00SA027858@d12av02.megacenter.de.ibm.com> Content-Type: text/plain Date: Mon, 03 Mar 2008 20:30:00 -0000 Message-Id: <1204576230.19253.585.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit 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/msg00020.txt.bz2 On Mon, 2008-03-03 at 21:00 +0100, Ulrich Weigand wrote: > Markus Deuling wrote: > > > when trying to put > 1 values into an array (fortran subrange) which > > comes from a register, register_size is called with regnum == -1. > > You need to fix the caller to not do this, then. > > > This patch replaces that gdb_assert by a proper error message before > > exiting: > > An "internal error" is neither more nor less "proper" than a failed > assertion. Both say "there's a bug in GDB", and neither should be > triggerable by normal user interaction. Yes, but they're not equivalent. An assertion failure terminates the session. Shouldn't we reserve that for situations that we can reasonably assume are un-recoverable?