From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2127 invoked by alias); 4 May 2011 18:05:01 -0000 Received: (qmail 2092 invoked by uid 22791); 4 May 2011 18:04:59 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 04 May 2011 18:04:45 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p44I4ijO004194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 May 2011 14:04:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p44I4hBV010080; Wed, 4 May 2011 14:04:43 -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 p44I4f7D022078; Wed, 4 May 2011 14:04:41 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4C44137848F; Wed, 4 May 2011 12:04:41 -0600 (MDT) From: Tom Tromey To: Jakub Jelinek Cc: Richard Henderson , Jason Merrill , Cary Coutant , gcc-patches@gcc.gnu.org, Roland McGrath , Jan Kratochvil , Mark Wielaard Subject: Re: [RFC PATCH] Typed DWARF stack References: <20110325113237.GY18914@tyan-ft48-01.lab.bos.redhat.com> Date: Wed, 04 May 2011 18:22:00 -0000 In-Reply-To: <20110325113237.GY18914@tyan-ft48-01.lab.bos.redhat.com> (Jakub Jelinek's message of "Fri, 25 Mar 2011 12:32:37 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00334.txt.bz2 >>>>> "Jakub" == Jakub Jelinek writes: Jakub> This patch on top of Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01224.html Jakub> and Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01723.html Jakub> implements parts of Cary's typed DWARF stack proposal: Jakub> http://www.dwarfstd.org/doc/040408.1.html I've been implementing this in GDB and I have a couple of questions. Should DW_OP_bra be restricted to integral types? Several other opcodes are restricted in this way, and it seems like an oversight to me that DW_OP_bra is lacking this restriction. (I've added this restriction in GDB.) Currently, the comparison operators are all defined as performing signed operations. So, what should happen in this case: DW_OP_lit0 DW_OP_GNU_convert DW_OP_GNU_const_type -1 DW_OP_gt That is, should this ignore the type (perhaps just using the type width), or is this a bug in the spec? Either answer here has problems. You can't really ignore the type, because that rules out floating point comparisons. I suppose you could special-case integral types. However, since "ordinary" (that is, pre-typed-DWARF) DWARF values do not have a consistent type, I think answering "bug" means having a special case for such values -- because they are treated as unsigned in most places, but signed in a few, and signed/unsigned type conversion should presumably only be done for such "typeless" values, not all values. I think I will implement the latter ("bug") approach. Tom