From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3707 invoked by alias); 17 Mar 2009 21:07:14 -0000 Received: (qmail 3698 invoked by uid 22791); 17 Mar 2009 21:07:14 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Mar 2009 21:07:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n2HL71gl032093; Tue, 17 Mar 2009 17:07:01 -0400 Received: from opsy.redhat.com (vpn-14-28.rdu.redhat.com [10.11.14.28]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2HL70bs001856; Tue, 17 Mar 2009 17:07:01 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 701103782FE; Tue, 17 Mar 2009 15:06:58 -0600 (MDT) To: Thiago Jung Bauermann Cc: Alexandre Oliva , Daniel Jacobowitz , gdb@sourceware.org Subject: Re: any expression to tell whether a variable was optimized out? References: <20090310125945.GA4376@caradoc.them.org> <1236700079.11106.1.camel@localhost.localdomain> <1236710732.11106.30.camel@localhost.localdomain> From: Tom Tromey Reply-To: tromey@redhat.com Date: Tue, 17 Mar 2009 21:07:00 -0000 In-Reply-To: <1236710732.11106.30.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Tue\, 10 Mar 2009 15\:45\:32 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-03/txt/msg00113.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: Thiago> You can also do the above by checking out the archer-tromey-python Thiago> branch, and applying the patch below. I didn't commit this yet because I Thiago> don't know if it would be better to have is_optimized_out function as a Thiago> method or attribute of gdb.Value... I think attribute, because (AFAIK) it is immutable. I'm a little surprised that this is an attribute of values at all. Doesn't that seem weird? Is there anything useful that can be done with a value like this? Perhaps just fetching its type? Tom