From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10675 invoked by alias); 7 Sep 2005 13:50:05 -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 10617 invoked by uid 22791); 7 Sep 2005 13:49:53 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 07 Sep 2005 13:49:52 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ED0Gq-0003hS-RM for gdb@sources.redhat.com; Wed, 07 Sep 2005 15:47:24 +0200 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 ; Wed, 07 Sep 2005 15:47:24 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Sep 2005 15:47:24 +0200 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: Evaluating an expression in a given scope Date: Wed, 07 Sep 2005 13:50:00 -0000 Message-ID: References: <20050907131434.GB2963@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-SW-Source: 2005-09/txt/msg00052.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Sep 07, 2005 at 04:39:52PM +0400, Vladimir Prus wrote: >> >> Hello! >> >> Does gdb provides a clean way to evaluate an expression in a given scope >> (file:line)? > > No, not really. File:line doesn't match unambiguously to scope, > either, so it's not clear what the interface should look like... I > think I'd use $pc instead. You mean that variable can some into scope in the middle of assembler code for a source-language line? Say: int i = j, j = 10; ? Well, true! Though it's really a corner case - Volodya