public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: archer@sourceware.org
Cc: Sami Wagiaalla <swagiaal@redhat.com>, Keith Seitz <keiths@redhat.com>
Subject: Re: Cross-CU C++ DIE references vs. mangling
Date: Wed, 10 Mar 2010 19:32:00 -0000	[thread overview]
Message-ID: <20100310193207.GA6147@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20100310191833.GA2816@host0.dyn.jankratochvil.net>

On Wed, 10 Mar 2010 20:18:33 +0100, Jan Kratochvil wrote:
> So GDB has to know the "S::i"->"_ZN1S1iE" mangling rules if there would be no
> DW_AT_MIPS_linkage_name.  Just in this case GDB will find out "S::i" in the
> defining CU (or shared library) and it can completely ignore this declaration.
...
> So there is a countercase where GDB cannot ignore such declaration-only DIE
> (and it is AFAIK the only requirement for GDB internal LOC_UNRESOLVED type):
> namespace S
>   {
>     int f ()
>       {
>         int i = 42;
>         {
>           extern int i;
>           return i;
>         }
>       }
>   }
...
>  <4><92>: Abbrev Number: 9 (DW_TAG_lexical_block)
>     <93>   DW_AT_low_pc      : 0xb      
>     <9b>   DW_AT_high_pc     : 0x11     
>  <2><45>: Abbrev Number: 4 (DW_TAG_variable)
>     <46>   DW_AT_name        : i        
>     <4a>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x40): _ZN1S1iE   
>     <52>   DW_AT_external    : 1        
>     <53>   DW_AT_declaration : 1        

In this case if it see DW_AT_external + DW_AT_declaration it can also global
"S::i" defining DIE so DW_AT_MIPS_linkage_name is probably really not needed.


Found it only after posting it, sorry,
Jan

  reply	other threads:[~2010-03-10 19:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 19:18 Jan Kratochvil
2010-03-10 19:32 ` Jan Kratochvil [this message]
2010-03-11  6:03   ` Roland McGrath
2010-04-12 18:51     ` Sami Wagiaalla
2010-04-27  8:50       ` Roland McGrath

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=20100310193207.GA6147@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=archer@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=swagiaal@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).