Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Fix some cases of "using" declarations with older G++  versions
Date: Thu, 25 Mar 2010 18:13:00 -0000	[thread overview]
Message-ID: <20100325181307.GA12511@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <201003251627.o2PGR0Mm002491@d12av02.megacenter.de.ibm.com>

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


  reply	other threads:[~2010-03-25 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 16:27 Ulrich Weigand
2010-03-25 18:13 ` Jan Kratochvil [this message]
2010-03-25 19:36   ` Ulrich Weigand
2010-03-26 14:18     ` Daniel Jacobowitz
2010-03-26 18:57       ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100325181307.GA12511@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox