From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11430 invoked by alias); 27 Jun 2003 13:36:05 -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 11421 invoked from network); 27 Jun 2003 13:36:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 27 Jun 2003 13:36:05 -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 h5RDa4H23378 for ; Fri, 27 Jun 2003 09:36:04 -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 h5RDa4I22004 for ; Fri, 27 Jun 2003 09:36:04 -0400 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 h5RDa3219396; Fri, 27 Jun 2003 09:36:03 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 012342CA3B; Fri, 27 Jun 2003 09:42:54 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16124.18909.847818.868778@localhost.redhat.com> Date: Fri, 27 Jun 2003 13:36:00 -0000 To: gdb-patches@sources.redhat.com Cc: nickc@redhat.com Subject: Re: [PATCH] fix symbol reading for separate debug info In-Reply-To: <16123.25811.278735.90386@localhost.redhat.com> References: <16123.25811.278735.90386@localhost.redhat.com> X-SW-Source: 2003-06/txt/msg00813.txt.bz2 committed to gdb6 branch and trunk. elena Elena Zannoni writes: > > This fixes the problem reported by Nick in: > http://sources.redhat.com/ml/gdb-patches/2003-06/msg00409.html > > The binutils support for the separate debug info file can now be used. I > think Nick has a couple of fixes for objcopy to check in. > > > Ah, to generate the separate debug files I did: > > /home/ezannoni/uberbaum/installed/bin/strip --strip-debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break -o /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.stripped > > /home/ezannoni/uberbaum/installed/bin/strip --only-keep-debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break -o /home/ezannoni/sepdebug-binutils/home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.debug > > /home/ezannoni/uberbaum/installed/bin/objcopy --add-gnu-debuglink=/home/ezannoni/sepdebug-binutils/home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.stripped /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break > > > elena > > 2003-06-26 Elena Zannoni > > * symfile.c (syms_from_objfile): Move variables to inner block. > Move the checks for the non-mainline case a bit earlier to avoid > doing some useless computations. > Index: symfile.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/symfile.c,v > retrieving revision 1.100 > diff -u -p -r1.100 symfile.c > --- symfile.c 22 Jun 2003 18:32:49 -0000 1.100 > +++ symfile.c 26 Jun 2003 20:43:20 -0000 > @@ -566,12 +566,8 @@ syms_from_objfile (struct objfile *objfi > int mainline, > int verbo) > { > - asection *lower_sect; > - asection *sect; > - CORE_ADDR lower_offset; > struct section_addr_info *local_addr = NULL; > struct cleanup *old_chain; > - int i; > > gdb_assert (! (addrs && offsets)); > > @@ -626,8 +622,13 @@ syms_from_objfile (struct objfile *objfi > > We no longer warn if the lowest section is not a text segment (as > happens for the PA64 port. */ > - if (!mainline) > + if (!mainline && addrs && addrs->other[0].name) > { > + asection *lower_sect; > + asection *sect; > + CORE_ADDR lower_offset; > + int i; > + > /* Find lowest loadable section to be used as starting point for > continguous sections. FIXME!! won't work without call to find > .text first, but this assumes text is lowest section. */ > @@ -659,9 +660,7 @@ syms_from_objfile (struct objfile *objfi > (the loadable section directly below it in memory). > this_offset = lower_offset = lower_addr - lower_orig_addr */ > > - /* Calculate offsets for sections. */ > - if (addrs) > - for (i=0 ; i < addrs->num_sections && addrs->other[i].name; i++) > + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) > { > if (addrs->other[i].addr != 0) > {