From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17884 invoked by alias); 24 Feb 2010 16:10:09 -0000 Received: (qmail 17783 invoked by uid 22791); 24 Feb 2010 16:10:07 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.17.165) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Feb 2010 16:10:00 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id o1OG9vBv012010 for ; Wed, 24 Feb 2010 16:09:57 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1OG9v0l1740908 for ; Wed, 24 Feb 2010 17:09:57 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o1OG9uO6014400 for ; Wed, 24 Feb 2010 17:09:57 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o1OG9tEW014381; Wed, 24 Feb 2010 17:09:55 +0100 Message-Id: <201002241609.o1OG9tEW014381@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 24 Feb 2010 17:09:55 +0100 Subject: Re: FYI: fix big-endian bug with DWARF_VALUE_STACK To: mjw@redhat.com (Mark Wielaard) Date: Wed, 24 Feb 2010 16:10:00 -0000 From: "Ulrich Weigand" Cc: tromey@redhat.com, gdb-patches@sourceware.org In-Reply-To: <1267021199.6461.10.camel@springer.wildebeest.org> from "Mark Wielaard" at Feb 24, 2010 03:19:59 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-02/txt/msg00596.txt.bz2 Mark Wielaard wrote: > On Wed, 2010-02-24 at 15:11 +0100, Ulrich Weigand wrote: > > However, maybe I'm missing something here, in particular as I haven't been > > able to find a formal specification of DW_OP_stack_value -- I assume this > > is in the current DWARF4 draft? Is this available somewhere? > > The latest drafts are here: http://www.dwarfstd.org/doc/ Thanks! So in the latest draft we have: The DW_OP_stack_value operation specifies that the object does not exist in memory but its value is nonetheless known and is at the top of the DWARF expression stack. In this form of location description, the DWARF expression represents the actual value of the object, rather than its location. The DW_OP_stack_value operation terminates the expression. and an example: DW_OP_lit1 DW_OP_stack_value DW_OP_piece 4 DW_OP_breg3 0 DW_OP_breg4 0 DW_OP_plus DW_OP_stack_value DW_OP_piece 4 The object value is found in an anonymous (virtual) location whose value consists of two parts, given in memory address order: the 4 byte value 1 followed by the four byte value computed from the sum of the contents of r3 and r4. This doesn't fully resolve the question for me, but at least there's no explicit reference to the address size here ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com