From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4561 invoked by alias); 15 Apr 2013 07:00:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4550 invoked by uid 89); 15 Apr 2013 07:00:23 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_BJ autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 15 Apr 2013 07:00:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 81E661C79C7; Mon, 15 Apr 2013 03:00:21 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sLTGS+xXX2Ou; Mon, 15 Apr 2013 03:00:21 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4425D1C798E; Mon, 15 Apr 2013 03:00:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id F2F15C346B; Mon, 15 Apr 2013 00:00:18 -0700 (PDT) Date: Mon, 15 Apr 2013 16:05:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: FYI/prototype: re-implement relocs on ppc-aix Message-ID: <20130415070018.GA3525@adacore.com> References: <20130321222151.GH5447@adacore.com> <87d2urw7x2.fsf@fleche.redhat.com> <20130325194808.GL5447@adacore.com> <871uaffoq8.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871uaffoq8.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-04/txt/msg00418.txt.bz2 > I just mean taking the current default_symfile_offsets and changing it > to: > > ... default_symfile_offsets_base () { ... > everything except setting the offsets to defaults > } > > default_symfile_offsets () { > default_symfile_offsets_base() > ... set the offsets to the defaults > } > > Then your code can call default_symfile_offsets_base. Indeed. > Joel> +static struct obj_section * > Joel> +data_obj_section_from_objfile (struct objfile *objfile) > Joel> +{ > Joel> + struct obj_section *osect; > Joel> + > Joel> + ALL_OBJFILE_OSECTIONS (objfile, osect) > Joel> + if (strcmp (bfd_section_name (objfile->obfd, > Joel> osect->the_bfd_section), > Joel> + ".data") == 0) > Joel> + return osect; > > Tom> Can this not look at objfile->data_sect_index? > > Joel> Not if I am understanding it right. objfile->sect_index_data is > Joel> an index in the objfile->section_offsets array. I couldn't convince > Joel> myself from the current documentation that those indices applied > Joel> to both objfile->section_offsets and objfile->sections. It would be > Joel> ideal if I could! > > After the obj_section merge, they are the same. ... and it looks like the patch series is in, too. I will make that change too. Since the change is not in 7.6, and I'd like my patch to be reasonably applicable to that branch, I'll keep that part as a second patch. -- Joel