From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3561 invoked by alias); 13 Aug 2003 22:11:26 -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 3553 invoked from network); 13 Aug 2003 22:11:26 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Aug 2003 22:11:26 -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 h7DMBQt28824 for ; Wed, 13 Aug 2003 18:11:26 -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 h7DMBQs07522 for ; Wed, 13 Aug 2003 18:11:26 -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 h7DMBPh3021548 for ; Wed, 13 Aug 2003 18:11:25 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 3137C2CB2C; Wed, 13 Aug 2003 18:19:11 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16186.47455.21008.985967@localhost.redhat.com> Date: Wed, 13 Aug 2003 22:11:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] fix for separate debug info X-SW-Source: 2003-08/txt/msg00227.txt.bz2 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 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. */