This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Defer symbol addition until construction is complete


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]