This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: FYI/prototype: re-implement relocs on ppc-aix
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Apr 2013 09:00:18 +0200
- Subject: Re: FYI/prototype: re-implement relocs on ppc-aix
- References: <20130321222151 dot GH5447 at adacore dot com> <87d2urw7x2 dot fsf at fleche dot redhat dot com> <20130325194808 dot GL5447 at adacore dot com> <871uaffoq8 dot fsf at fleche dot redhat dot com>
> 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