This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Defer symbol addition until construction is complete
- From: Tom Tromey <tromey at redhat dot com>
- To: sami wagiaalla <swagiaal at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 29 Jul 2010 14:58:51 -0600
- Subject: Re: [patch] Defer symbol addition until construction is complete
- References: <4C446F09.50107@redhat.com>
>>>>> "Sami" == sami wagiaalla <swagiaal@redhat.com> writes:
Sami> In new_symbol adding the symbol to the pending symbol list is
Sami> performed at various times and it is added to various lists making
Sami> uniform treatment of of symbols at addition point difficult. This
Sami> patch unifies the addition point and defers it to the end of
Sami> construction.
Looks quite reasonable.
Sami> * dwarf2read.c (new_symbol): Add symbol to variable list at end of
Sami> fucntion after symbol construction is complete.
Typo: "function".
Also you will need to rebase a little and s/new_symbol/new_symbol_full/
here.
Sami> if (attr2 && (DW_UNSND (attr2) != 0))
Sami> {
Sami> - struct pending **list_to_add;
Sami>
Sami> /* Workaround gfortran PR debug/40040 - it uses
Remove the blank line as well.
Sami> list_to_add = (cu->list_in_scope == &file_symbols
Sami> && (cu->language == language_cplus
Sami> || cu->language == language_java)
Sami> ? &global_symbols : cu->list_in_scope);
Sami>
Sami> - add_symbol_to_list (sym, list_to_add);
Here too.
Ok with those changes.
Tom