From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19134 invoked by alias); 25 Feb 2005 08:04:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19043 invoked from network); 25 Feb 2005 08:04:36 -0000 Received: from unknown (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org with SMTP; 25 Feb 2005 08:04:36 -0000 Received: from farnswood.snap.net.nz (p241-tnt1.snap.net.nz [202.124.110.241]) by viper.snap.net.nz (Postfix) with ESMTP id 5ED98459E71; Fri, 25 Feb 2005 21:04:34 +1300 (NZDT) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id A2FDC62FBE; Fri, 25 Feb 2005 08:02:42 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16926.56225.468108.544185@farnswood.snap.net.nz> Date: Fri, 25 Feb 2005 11:29:00 -0000 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: -var-create on invalid expression causes seg. fault In-Reply-To: <20050223160026.GA27996@nevyn.them.org> References: <16919.48311.476960.352611@farnswood.snap.net.nz> <42184BBA.6030007@tensilica.com> <20050223160026.GA27996@nevyn.them.org> X-SW-Source: 2005-02/txt/msg00160.txt.bz2 > Could you give the attached patch a try? I encountered a similar > problem in mi-var-block.exp when using ARM RVDS, which emits location > lists even at -O0. It frequently reports variables as "unavailable", > which is an error condition. > > The patch sets the variable to an error in the -var-update > "unavailable" case; this never passes any error message on to the user, > but that seems to be the prior art for varobj. > > You'll need to use catch_exceptions for your older sources; the patch > is for HEAD. > > [I haven't finished testing any of these patches, that's why I haven't > submitted this to gdb-patches yet.] This is what I get now: -var-create - * *1 ^done,name="var1",numchild="0",type="int" (gdb) -var-update * ~"varobj.c:1467: internal-error: my_value_equal: Assertion `!value_lazy (val1)' failed.\n" ~"A problem internal to GDB has been detected,\n" ~"further debugging may prove unreliable.\n" ~"Quit this debugging session? (y or n) " but I would expect "-var-create - * *1" to return: ^error,msg="Cannot access memory at address 0x1" I might be missing the point, since although I don't understand what you have done, Ross Morley clearly does. Nick