From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28499 invoked by alias); 14 Aug 2003 20:12:42 -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 28492 invoked from network); 14 Aug 2003 20:12:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 14 Aug 2003 20:12:41 -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 h7EKCft14514 for ; Thu, 14 Aug 2003 16:12:41 -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 h7EKCes29473 for ; Thu, 14 Aug 2003 16:12:40 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id h7EKCeED026487 for ; Thu, 14 Aug 2003 16:12:40 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 4DA462CA3D; Thu, 14 Aug 2003 16:20:28 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16187.61195.660740.776611@localhost.redhat.com> Date: Thu, 14 Aug 2003 20:12:00 -0000 To: gdb-patches@sources.redhat.com Subject: Re: [PATCH] fix for separate debug info In-Reply-To: <16186.47455.21008.985967@localhost.redhat.com> References: <16186.47455.21008.985967@localhost.redhat.com> X-SW-Source: 2003-08/txt/msg00240.txt.bz2 Elena Zannoni writes: > > Turns out that this patch: > 2003-06-06 Mark Mitchell > > [...] > * symfile.c [...] > (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs > dynamically. > [...] > > broke the handling of separate debug info files. > > Here is a fix. Nobody had noticed this failure because you need the > separate debug info for libraries, etc installed and because there is > no test for this feature. I'll add one next. > > > elena > committed to gdb-6 and mainline elena > > 2003-08-13 Elena Zannoni > > * symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure > orig_addrs is set up properly. > > Index: symfile.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/symfile.c,v > retrieving revision 1.101 > diff -u -p -r1.101 symfile.c > --- symfile.c 27 Jun 2003 13:11:17 -0000 1.101 > +++ symfile.c 13 Aug 2003 22:08:27 -0000 > @@ -854,7 +854,12 @@ symbol_file_add_with_addrs_or_offsets (c > orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); > my_cleanups = make_cleanup (xfree, orig_addrs); > if (addrs) > - *orig_addrs = *addrs; > + { > + int i; > + orig_addrs->num_sections = addrs->num_sections; > + for (i = 0; i < addrs->num_sections; i++) > + orig_addrs->other[i] = addrs->other[i]; > + } > > /* If the objfile uses a mapped symbol file, and we have a psymtab for > it, then skip reading any symbols at this time. */