From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22795 invoked by alias); 24 Feb 2012 15:54:36 -0000 Received: (qmail 22785 invoked by uid 22791); 24 Feb 2012 15:54:35 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from na3sys009aog108.obsmtp.com (HELO na3sys009aog108.obsmtp.com) (74.125.149.199) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Feb 2012 15:54:22 +0000 Received: from hub3.qnx.com ([209.226.137.86]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKT0eyrOsxU8xI0kjvRXp4dyeccoFVMp/0@postini.com; Fri, 24 Feb 2012 07:54:22 PST Received: by hub3.qnx.com (Postfix, from userid 32767) id 781D26C51B3; Fri, 24 Feb 2012 10:54:19 -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 79CD26C51AF; Fri, 24 Feb 2012 10:54:17 -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 10:53:54 -0500 Message-ID: <4F47B2A8.3070202@qnx.com> Date: Fri, 24 Feb 2012 16:00: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> In-Reply-To: <4F47AFA8.7070302@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/msg00578.txt.bz2 On 12-02-24 10:41 AM, Pedro Alves wrote: > On 02/14/2012 08:44 PM, Aleksandar Ristovski wrote: >> --- gdb/stack.c 7 Feb 2012 04:48:22 -0000 1.247 >> +++ gdb/stack.c 14 Feb 2012 20:43:08 -0000 >> @@ -909,6 +909,11 @@ set_last_displayed_sal (int valid, struc >> last_displayed_addr = addr; >> last_displayed_symtab = symtab; >> last_displayed_line = line; >> + if (valid&& pspace == NULL) >> + { >> + warning (_("Trying to set NULL pspace.")); > > Is there a case when this isn't a gdb bug? IOW, any reason this isn't a gdb_assert? > This seems like a rather cryptic warning to show to a user. I believe it would be a bug. However, gdb_assert is rather destructive. The warning is to bring it to our attention, but continue so users can actually do debugging if this happens. My thinking was: if sal is invalidated the rest of the code should continue functioning thus providing more value to the user (albeit maybe somewhat confused user) than killing the session. Anyway that was my rationale. --- Aleksandar