From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32340 invoked by alias); 20 Mar 2006 06:50:31 -0000 Received: (qmail 32330 invoked by uid 22791); 20 Mar 2006 06:50:31 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 20 Mar 2006 06:50:30 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1FLEDf-0004eF-KY for gdb-patches@sources.redhat.com; Mon, 20 Mar 2006 07:50:23 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Mar 2006 07:50:23 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Mar 2006 07:50:23 +0100 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: MI: type prefixes for values Date: Tue, 21 Mar 2006 14:58:00 -0000 Message-ID: References: <17427.54333.236860.258115@kahikatea.snap.net.nz> <20060317191207.GA19068@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00239.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Mar 17, 2006 at 07:07:17PM +0300, Vladimir Prus wrote: >> Nick Roberts wrote: >> >> > 2006-03-12 Nick Roberts >> > >> > * mi/mi-cmd-stack.c (list_args_or_locals): Use common_val_print >> > instead of print_variable_value so that type doesn't get printed >> > with value. >> >> This patch is much more important that value formatting, in fact. Without >> it, if there's local reference variable that's no initialized, we get >> this output from gdb: >> >> (gdb) -stack-list-locals --all-values >> Cannot access memory at address 0x1 >> ^error,msg="Cannot access memory at address 0x1" >> >> Essentially, I can't see any local variables. This patch fixes this too, >> because, I believe, common_val_print does check for non-dereferencable >> values. Changelogs say common_val_print was specifically added for this >> purpose. > > Did you try this? Yes, I did. I got the above error without the patch, with CVS HEAD state. I got the list of local variables, on the same testcase, with CVS HEAD + patch. > I don't think it will: common_val_print was added > for the optimized-out case, not for the memory-error case, which should > be handled somewhere else. I don't know why, but this patch fixes the memory error too. - Volodya