From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6711 invoked by alias); 24 Feb 2012 16:16:22 -0000 Received: (qmail 6693 invoked by uid 22791); 24 Feb 2012 16:16:19 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from na3sys009aog111.obsmtp.com (HELO na3sys009aog111.obsmtp.com) (74.125.149.205) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Feb 2012 16:16:06 +0000 Received: from hub3.qnx.com ([209.226.137.86]) (using TLSv1) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKT0e3xD3F34GpPlgUTJcMFSwMCZr9v39F@postini.com; Fri, 24 Feb 2012 08:16:06 PST Received: by hub3.qnx.com (Postfix, from userid 32767) id B2A0A6C51B0; Fri, 24 Feb 2012 11:16:03 -0500 (EST) Received: from EXHTS1.ott.qnx.com (exhts1 [10.222.2.110]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hub3.qnx.com (Postfix) with ESMTPS id EEF386C51B0; Fri, 24 Feb 2012 11:16:01 -0500 (EST) Received: from [10.222.96.215] (10.222.96.215) by qnx.com (10.222.2.25) with Microsoft SMTP Server id 14.1.355.2; Fri, 24 Feb 2012 11:15:38 -0500 Message-ID: <4F47B7C0.2040504@qnx.com> Date: Fri, 24 Feb 2012 16:18:00 -0000 From: Aleksandar Ristovski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [patch] Assert when 'break' with no arguments References: <20120214185333.GB14803@adacore.com> <4F3AB4AE.2010504@qnx.com> <4F3AC7A9.3020805@qnx.com> <4F47AFA8.7070302@redhat.com> <4F47B2A8.3070202@qnx.com> <4F47B53D.8050003@redhat.com> In-Reply-To: <4F47B53D.8050003@redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00583.txt.bz2 On 12-02-24 11:05 AM, Pedro Alves wrote: > > Trouble is that cryptic warnings usually end up unnoticed > and unreported (users will just shrug at gdb's lameness). > > If we clear the last displayed sal before issuing an internal > error, then we're more sure to catch the bug, and users can still say > no to "Quit this debugging session? (y or n)" and continue > debugging. WDYT? > > diff --git a/gdb/stack.c b/gdb/stack.c > index 070d658..22b16a5 100644 > --- a/gdb/stack.c > +++ b/gdb/stack.c > @@ -911,8 +911,9 @@ set_last_displayed_sal (int valid, struct program_space *pspace, > last_displayed_line = line; > if (valid&& pspace == NULL) > { > - warning (_("Trying to set NULL pspace.")); > clear_last_displayed_sal (); > + internal_error (__FILE__, __LINE__, > + _("Trying to set NULL pspace.")); > } > } > > I understand your motive; strictly speaking, this is more correct, so fine by me. The error is not supposed to happen anyway :-) Thanks, Aleksandar