This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv3 2/2] Accelerate lookup_symbol_aux_objfile 85x
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 3 Dec 2014 19:05:07 +0100
- Subject: Re: [patchv3 2/2] Accelerate lookup_symbol_aux_objfile 85x
- Authentication-results: sourceware.org; auth=none
- References: <20141020214410 dot GA22011 at host2 dot jankratochvil dot net> <CAP9bCMQ7EXyXJiqK4j2UA9YgxkQiNFFqJPOpbPXH8-YZMRLh2w at mail dot gmail dot com> <20141023182434 dot GA31412 at host2 dot jankratochvil dot net> <CAP9bCMTrzU7srWLfiS2814nfBEySJ-i6yKy7AKHBvXbUoLa-rQ at mail dot gmail dot com> <20141129121124 dot GA21606 at host2 dot jankratochvil dot net> <m3ppc2698r dot fsf at sspiff dot org>
On Tue, 02 Dec 2014 04:06:28 +0100, Doug Evans wrote:
> I was reviewing all the callers of lookup_symbol_in_objfile_symtabs.
I do not see why, see below.
> This patch assumes we're looping over all objfiles,
No. each objfile is considered completely independent wrt various kinds of
symbol tables and their inter-refefences.
Function block_lookup_symbol_primary() assumes we're looping over all
'compunit_symtabs's (of an objfile). This is satisfied by the current only
caller of block_lookup_symbol_primary()
(which is lookup_symbol_in_objfile_symtabs()).
> but some callers aren't. e.g., lookup_symbol_in_objfile_from_linkage_name.
> It seems like we'll need to make a copy of lookup_symbol_in_objfile_symtabs
> and call that in lookup_symbol_in_objfile (plus I'd add some comments
> to lookup_symbol_in_objfile warning the reader that included symtabs
> are not searched).
>
> I could be missing something though.
I also can be missing something but I do not see why
block_lookup_symbol_primary() should have any dependencies on other objfiles
than the one that is passed to it.
Thanks,
Jan