This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] remove msymbol_objfile
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 01 Aug 2013 17:11:27 +0100
- Subject: Re: [PATCH] remove msymbol_objfile
- References: <1374513070-10786-1-git-send-email-tromey at redhat dot com>
On 07/22/2013 06:11 PM, Tom Tromey wrote:
> This is another patch in my ongoing series to "split" objfile to share
> more read-only data across inferiors. See
>
> http://sourceware.org/gdb/wiki/ObjfileSplitting
>
> When symbols are finally shared, there will be no back-link from the
> symbol to its containing objfile, because there may be more than one
> such objfile. So, all suck back-links must be removed.
>
> One hidden back-link is the msymbol_objfile function. Since
> (eventually) a symbol may appear in more than one objfile, trying to
> look up the objfile given just a symbol cannot work.
>
> This patch removes msymbol_objfile in favor of using a bound minimal
> symbol. It introduces a new function to make this conversion simpler
> in some spots.
>
> The bonus of this patch is that using msymbol_objfile is slower than
> simply looking up the owning objfile in the first place.
FWIW, I read this, and it looked fine to me.
Thanks,
--
Pedro Alves