From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25822 invoked by alias); 21 Aug 2002 17:38:49 -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 25782 invoked from network); 21 Aug 2002 17:38:48 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 21 Aug 2002 17:38:48 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g7LHOOl19406 for ; Wed, 21 Aug 2002 13:24:24 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7LHclY23065 for ; Wed, 21 Aug 2002 13:38:47 -0400 Received: from localhost.localdomain (IDENT:SmZI+ls3VHzTqQNssrlQGmAe/f79rs+q@romulus.sfbay.redhat.com [172.16.27.251]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7LHckW17044; Wed, 21 Aug 2002 13:38:46 -0400 Content-Type: text/plain; charset="iso-8859-1" From: "Martin M. Hunt" Organization: Red Hat Inc To: Jim Blandy Subject: Re: DWARF2 line number problem Date: Wed, 21 Aug 2002 10:38:00 -0000 User-Agent: KMail/1.4.1 References: <200208202156.14042.hunt@redhat.com> In-Reply-To: Cc: gdb@sources.redhat.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200208211038.03163.hunt@redhat.com> X-SW-Source: 2002-08/txt/msg00250.txt.bz2 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. GAS calculates the size of addresses to put in the line table from bfd_arch_bits_per_address() which returns 64 even though in the case of o32 we are using a 32-bit ABI. gas is passed "-32" on its command line, so perhaps it should be using this? I am wondering why no one else has run into this problem? Maybe I am missing something? -- Martin Hunt GDB Engineer Red Hat, Inc.