From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4757 invoked by alias); 8 May 2007 20:36:15 -0000 Received: (qmail 4732 invoked by uid 22791); 8 May 2007 20:36:08 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 May 2007 20:35:57 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id DDFFF4B26F; Tue, 8 May 2007 15:35:55 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id A78784B26D; Tue, 8 May 2007 15:35:51 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HlWPV-0004TZ-Uz; Tue, 08 May 2007 16:35:50 -0400 Date: Tue, 08 May 2007 20:36:00 -0000 From: Daniel Jacobowitz To: Carl Burch Cc: gdb@sourceware.org Subject: Re: DWARF-2 expression error in location list entries Message-ID: <20070508203549.GA17019@caradoc.them.org> Mail-Followup-To: Carl Burch , gdb@sourceware.org References: <200705082022.NAA04796@hpadl693.cup.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705082022.NAA04796@hpadl693.cup.hp.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-05/txt/msg00032.txt.bz2 On Tue, May 08, 2007 at 01:22:25PM -0700, Carl Burch wrote: > In dwarf2expr.c function execute_stack_op() there are two occurrences of > error() calls asserting : > > if (op_ptr != op_end && *op_ptr != DW_OP_piece) > error (_("DWARF-2 expression error: DW_OP_reg operations must be " > "used either alone or in conjuction with DW_OP_piece.")); > > A couple of us have looked for that first restriction in the DWARF3 > standard and not found it. I also went back to the DWARF2 standard > literally cited by the message and failed to find it there as well. Can > anyone point out where to read the restriction these error() calls refer to? I believe the language was recently discussed on the dwarf workgroup list. It's unclear, but the error is correct. DW_OP_regx describes a location ("the value is in this register"), not a value ("the value is the contents of this register"). Therefore the value may not be stack-sized, and is not pushed on to the expression stack, so there's nothing for you to DW_OP_deref later. > The expression we have in mind to add is to describe Fortran reference > parameters in location list entries like : > > { 0x4022720--0x4022724: DW_OP_regx 32 DW_OP_deref } Isn't that just "DW_OP_bregx 32 0"? -- Daniel Jacobowitz CodeSourcery