From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7219 invoked by alias); 1 Feb 2003 00:43:49 -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 7211 invoked from network); 1 Feb 2003 00:43:49 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 1 Feb 2003 00:43:49 -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 h110hnf02298 for ; Fri, 31 Jan 2003 19:43:49 -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 h110hna29674 for ; Fri, 31 Jan 2003 19:43:49 -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 h110hlQ19881 for ; Fri, 31 Jan 2003 19:43:47 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 4B781FF79; Fri, 31 Jan 2003 19:47:57 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <15931.6461.240936.968974@localhost.redhat.com> Date: Sat, 01 Feb 2003 00:43:00 -0000 To: David Carlton Cc: 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> X-SW-Source: 2003-02/txt/msg00002.txt.bz2 David Carlton writes: > On Fri, 31 Jan 2003 14:27:07 -0500, Daniel Jacobowitz = said: >=20 > > Much thanks; checked in with better comments. >=20 > I think there are problems here: my test runs are failing. E.g. when > I run GDB on gdb.c++/misc and run to main, I get a crash with a > backtrace starting with this: >=20 > #0 symfile_relocate_debug_section (abfd=3D0x82e4718, sectp=3D0x0,=20 > buf=3D0x830e6f8 "x=B0\f@=AC=B0\f@=E0=B0\f@\024=B1\f@H=B1\f@|=B1\f@= =B0=B1\f@=E4=B1\f@\030=B2\f@L=B2\f@\200=B2\f@=B4=B2\f@=E8=B2\f@\034=B3\f@P= =B3\f@\204=B3\f@=B8=B3\f@=EC=B3\f@ =B4\f@T=B4\f@\210=B4\f@=BC=B4\f@=F0=B4\f= @$=B5\f@X=B5\f@\214=B5\f@=C0=B5\f@=F4=B5\f@(=B6\f@\\=B6\f@\220=B6\f@=C4=B6\= f@=F8=B6\f@,=B7\f@`=B7\f@\224=B7\f@=C8=B7\f@=FC=B7\f@0=B8\f@d=B8\f@\230=B8\= f@=CC=B8\f@") at symfile.c:3594 > #1 0x0813e488 in dwarf2_read_section (objfile=3D0x830e6f8, offset=3D0,= =20 > size=3D137422584, sectp=3D0x0) at dwarf2read.c:3627 > #2 0x0813a6ae in dwarf2_build_psymtabs (objfile=3D0x0, mainline=3D13725= 0584) > at dwarf2read.c:1050 >=20 > 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: >=20 > if (dwarf_ranges_offset) > dwarf_ranges_buffer =3D dwarf2_read_section (objfile, > dwarf_ranges_offset, > dwarf_ranges_size, > dwarf_ranges_section); > else > dwarf_ranges_buffer =3D NULL; >=20 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. > It's been long enough since I looked at this code that I have no idea > if a NULL section is allowed here or not. Definitely there doesn't have to be a ranges section. elena >=20 > David Carlton > carlton@math.stanford.edu