From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14455 invoked by alias); 1 Sep 2009 23:47:59 -0000 Received: (qmail 14445 invoked by uid 22791); 1 Sep 2009 23:47:59 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 23:47:55 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n81Nld23032277; Tue, 1 Sep 2009 19:47:39 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n81NlcIV027086; Tue, 1 Sep 2009 19:47:38 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n81NlbEZ012774; Tue, 1 Sep 2009 19:47:37 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 02353378211; Tue, 1 Sep 2009 17:47:36 -0600 (MDT) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFC: DW_OP_call_frame_cfa, again References: <200909020023.57398.pedro@codesourcery.com> Reply-To: Tom Tromey Date: Tue, 01 Sep 2009 23:47:00 -0000 In-Reply-To: <200909020023.57398.pedro@codesourcery.com> (Pedro Alves's message of "Wed, 2 Sep 2009 00:23:56 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00045.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: >> +/* CFA accesses require a frame. */ >> +static CORE_ADDR >> +needs_frame_frame_cfa (void *baton) >> +{ >> + struct needs_frame_baton *nf_baton = baton; >> + nf_baton->needs_frame = 1; >> + return 1; >> +} >> + Pedro> Return type is CORE_ADDR, but it returns 1? Yes, just like needs_frame_read_reg and needs_frame_tls_address in the same section. The result is arbitrary, in this code the expression is being evaluated for its side effect of computing needs_frame. I am not really certain that this code always works. It seems to me that it won't handle branches properly. But, that is a not a bug introduced by my change. Pedro> Stale comment. Thanks, I'll fix it. Tom