[patch] Do not add partial_symbol again and again to the list
Aleksandar Ristovski
aristovski@qnx.com
Wed May 7 09:01:00 GMT 2008
Daniel Jacobowitz wrote:
>
> I think we should finish up this patch, and then proceed from there.
>
> Should we use this optimization for all global psymtabs? If so, then
> we ought to do it in common code so that all the other symbol readers,
> like stabs, benefit.
>
Ok, here is simplified, but with broader consequences patch.
The patch now affects all readers that use add_psymbol_to_list by
not allowing duplicate partial symbols in the global psymbol list
(for a given objfile).
Tested on linux dwarf2 format, no regression. I did
not test other debug formats.
Thanks,
Aleksandar
ChangeLog
* bcache.c (bcache_data): Call bcache_added function.
(bcache_added): New function name. Body of function bcache_data
is used here with the addition of 'added' argument.
* bcache.h (bcache_added): New function.
* symfile.c (add_psymbol_to_bcache): New helper function, takes part of
work from add_psymbol_to_list - initializes partial symbol and stashes
it in objfile's cache.
(append_psymbol_to_list): New helper function, takes other part of
work from add_psymbol_to_list - adds partial symbol to the given list.
(add_psymbol_to_list): Call helper functions instead of doing work
here. If adding to global list, do not duplicate partial symbols in the
partial symtab.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bcache_added_donotduplicatepsyms20080506.diff
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080507/b7f8789f/attachment-0001.ksh>
More information about the Gdb-patches
mailing list