From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2079 invoked by alias); 21 Aug 2002 17:57:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2061 invoked from network); 21 Aug 2002 17:57:33 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 21 Aug 2002 17:57:33 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id g7LHkl503827; Wed, 21 Aug 2002 12:46:47 -0500 To: "Martin M. Hunt" Cc: gdb@sources.redhat.com Subject: Re: DWARF2 line number problem References: <200208202156.14042.hunt@redhat.com> <200208211038.03163.hunt@redhat.com> From: Jim Blandy Date: Wed, 21 Aug 2002 10:57:00 -0000 In-Reply-To: <200208211038.03163.hunt@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.90 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00252.txt.bz2 "Martin M. Hunt" writes: > On Tuesday 20 August 2002 10:13 pm, you wrote: > > "Martin M. Hunt" writes: > > > I have a problem and I'm not sure what the correct solution would be. > > > > > > I'm looking at gcc mips output. The compilation unit says pointer > > > size is 4, but the DWARF line section is setting the address to a > > > sign-extended 8-byte value. GDB cleverly ignores the actual size of > > > the extended opcode and reads a 4-byte value then starts parsing the > > > rest of the bytes as line opcodes! > > > > Could you compile your program with -save-temps -dA, and post the > > assembly code? > > I'll send it to you if you want, but the problem is not there. > > The problem appears to be either GAS or GDB depending on how we > interpret the DWARF spec. In Dwarf 2, the size of an operand to DW_LNE_set_address is determined by the `address_size' field of the compilation unit header. If GDB isn't using that value, then it's a GDB bug. If GAS is putting one size in the compilation unit header, and using a different size when emitting line number information, then that's a GAS bug.