From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25098 invoked by alias); 19 Sep 2009 18:35:39 -0000 Received: (qmail 25088 invoked by uid 22791); 19 Sep 2009 18:35:38 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_NEUTRAL X-Spam-Check-By: sourceware.org Received: from gate.lvk.cs.msu.su (HELO lvk.cs.msu.su) (158.250.17.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Sep 2009 18:35:30 +0000 Received: from desktopvm.lvknet ([192.168.132.1] helo=wind.localnet) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.63) (envelope-from ) id 1Mp4mM-0000Xx-VI; Sat, 19 Sep 2009 22:35:26 +0400 From: Vladimir Prus To: Joel Brobecker Subject: Re: Symbols/blocks questions Date: Sat, 19 Sep 2009 18:35:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.90; i686; svn-979530; 2009-06-10) Cc: gdb@sources.redhat.com References: <200909191552.02677.ghost@cs.msu.su> <200909192041.14173.ghost@cs.msu.su> <20090919170155.GO7961@adacore.com> In-Reply-To: <20090919170155.GO7961@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909192235.37739.ghost@cs.msu.su> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00238.txt.bz2 On Saturday 19 September 2009 Joel Brobecker wrote: > > Then, it's probably likewise not true for any other random address > > in block. And then, the only reliable way to identify a block is via > > its address. > > I think that's correct. We have routines IIRC that locate the innermost > block for a PC, or something like that, but I don't think we identify > blocks by their start address... > > > What I'm trying to do is make -stack-list-variables output block > > together with a name of variable, and make -var-create accept > > some block specification. This, together, should all to display > ^^^allow ? > > shadowed variables in frontend. Looks like 'block' should be > > the string rendition of the address of struct block :-/ > > Depending on the language, lexical blocks can be named, and it looks > like DWARF supports that, so I suppose you could you that. But blocks > can definitely be annonymous too, in which case the "string rendition" > might be a challenge... Well, string rendition is not really a challenge. You take struct block *, and then use phex :-) The id need not be stable across debug sessions, it just should be stable within one debug session. - Volodya > >