From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4216 invoked by alias); 1 Feb 2003 01:08:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4209 invoked from network); 1 Feb 2003 01:08:37 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 1 Feb 2003 01:08:37 -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 h1118bf08922 for ; Fri, 31 Jan 2003 20:08:37 -0500 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 h1118ba03116 for ; Fri, 31 Jan 2003 20:08:37 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1118ZQ21693; Fri, 31 Jan 2003 20:08:36 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 720CBFF79; Fri, 31 Jan 2003 20:12:48 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15931.7952.213719.470837@localhost.redhat.com> Date: Sat, 01 Feb 2003 01:08:00 -0000 To: David Carlton Cc: Elena Zannoni , Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] Relocate debug information in object files (e.g. add-symbol-file) [take 2] In-Reply-To: References: <20020404170610.A3717@nevyn.them.org> <20021011144448.GA31467@nevyn.them.org> <15929.47017.286393.193280@localhost.redhat.com> <20030131192707.GA23658@nevyn.them.org> <15931.6461.240936.968974@localhost.redhat.com> X-SW-Source: 2003-02/txt/msg00004.txt.bz2 David Carlton writes: > On Fri, 31 Jan 2003 19:47:57 -0500, Elena Zannoni said: > > >> I haven't looked at it at all closely; but dwarf2_read_section (and > >> hence symfile_relocate_debug_section) is getting passed a NULL > >> section from this part of dwarf2_build_psymtabs: > >> > >> if (dwarf_ranges_offset) > >> dwarf_ranges_buffer = dwarf2_read_section (objfile, > >> dwarf_ranges_offset, > >> dwarf_ranges_size, > >> dwarf_ranges_section); > >> else > >> dwarf_ranges_buffer = NULL; > >> > > > It's odd, if the dwarf_ranges_offset is zero, the call shouldn't be made. > > Maybe something is trashing the stack? > > > What gcc did you use? I tried with 2.96 (from RHL 7.2) and didn't see > > the error. > > Did you specify DWARF 2? I saw this on 3.1. > Doh. right, I keep forgetting I am still using stabs. I definitely need to upgrade my machine. > I've found the problem, though: nobody seems to be setting > dwarf_ranges_section! Patch enclosed below; I'm running it through > the testsuite, and I'll commit it as obvious if it cures the problem. > Thanks, if it works, go ahead. elena > David Carlton > carlton@math.stanford.edu > > 2003-01-31 David Carlton > > * dwarf2read.c (dwarf2_locate_sections): Set > dwarf_ranges_section. > > Index: dwarf2read.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2read.c,v > retrieving revision 1.81 > diff -u -p -r1.81 dwarf2read.c > --- dwarf2read.c 31 Jan 2003 19:22:18 -0000 1.81 > +++ dwarf2read.c 1 Feb 2003 00:57:49 -0000 > @@ -1002,6 +1002,7 @@ dwarf2_locate_sections (bfd *ignore_abfd > { > dwarf_ranges_offset = sectp->filepos; > dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); > + dwarf_ranges_section = sectp; > } > } >