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: [rfc] Fix some cases of "using" declarations with older G++ versions


On Thu, 25 Mar 2010 17:27:00 +0100, Ulrich Weigand wrote:
> @@ -3940,6 +3940,30 @@ read_func_scope (struct die_info *die, s
>  
>    inherit_abstract_dies (die, cu);
>  
> +  /* If we have a DW_AT_specification, we might need to import using
> +     directives from the context of the specification DIE.  See the
> +     comment in determine_prefix.  */
> +  if (cu->language == language_cplus)
> +    {
> +      struct dwarf2_cu *spec_cu = cu;
> +      struct die_info *spec_die = die_specification (die, &spec_cu);

This may also fetch DW_AT_abstract_origin which has been already imported by
inherit_abstract_dies.  But duplicate DW_TAG_imported_module should not hurt.


> +
> +      while (spec_die)
> +	{
> +	  child_die = spec_die->child;
> +	  while (child_die && child_die->tag)
> +	    {
> +	      if (child_die->tag == DW_TAG_imported_module)
> +		process_die (child_die, cu);
                                        spec_cu probably?


> +	      child_die = sibling_die (child_die);
> +	    }
> +
> +	  /* In some cases, GCC generates specification DIEs that
> +	     themselves contain DW_AT_specification attributes.  */
> +	  spec_die = die_specification (spec_die, &spec_cu);
> +	}
> +    }
> +
>    new = pop_context ();
>    /* Make a block for the local symbols within.  */
>    block = finish_block (new->name, &local_symbols, new->old_blocks,


Thanks,
Jan


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