From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31451 invoked by alias); 27 Nov 2006 19:46:16 -0000 Received: (qmail 31439 invoked by uid 22791); 27 Nov 2006 19:46:14 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Nov 2006 19:46:08 +0000 Received: (qmail 29385 invoked from network); 27 Nov 2006 19:46:07 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Nov 2006 19:46:07 -0000 To: "Rob Quill" Cc: gdb@sourceware.org Subject: Re: Checking variable scope References: From: Jim Blandy Date: Mon, 27 Nov 2006 19:46:00 -0000 In-Reply-To: (Rob Quill's message of "Thu, 23 Nov 2006 13:09:26 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2006-11/txt/msg00180.txt.bz2 "Rob Quill" writes: > I am stepping through the program, so I suppose I'd be looking to see > if the variable is in scope at the location of the PC. > > How would I call lookup_symbol, given that information? I had a brief > look, but I wasn't sure what parameters to pass to the function, or > how to get the right values. You can pass NULL for 'symtab' and 'is_a_field_of_this', and VAR_DOMAIN for domain. block is the scoping block containing the PC. I don't know where you're calling things from, so I can't really tell you how to get the current PC.