public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Sami Wagiaalla <swagiaal@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	Project Archer <archer@sourceware.org>,
	Dodji Seketeli <dseketel@redhat.com>
Subject: Re: DW_TAG_imported_declaration DW_TAG_base_type w/o DW_AT_name	[Re: using directive patch]
Date: Wed, 17 Jun 2009 15:02:00 -0000	[thread overview]
Message-ID: <4A390543.4040109@redhat.com> (raw)
In-Reply-To: <20090616203743.GA12904@host0.dyn.jankratochvil.net>

> Results in:
> 	die = <8c>
> 	imported_die = <3b>
> 	imported_name = "B"
> so the import gets processed, doesn't it?

Yes agreed... bad code example.

> Do you have a reproducer of incorrect GDB behavior?

Yes. Upon further digging I found the gcc bug.
Here is a much better example:

namespace A{
   typedef int B;
}

int main(){
   using A::B;
   B b;
   return b;
}

...
  <2><51>: Abbrev Number: 3 (DW_TAG_imported_declaration)
     <52>   DW_AT_decl_file   : 1
     <53>   DW_AT_decl_line   : 6
     <54>   DW_AT_import      : <0x75>
  <2><58>: Abbrev Number: 4 (DW_TAG_typedef)
     <59>   DW_AT_name        : B
     <5b>   DW_AT_decl_file   : 1
     <5c>   DW_AT_decl_line   : 2
     <5d>   DW_AT_type        : <0x6e>
...
  <1><75>: Abbrev Number: 7 (DW_TAG_base_type)
     <76>   DW_AT_byte_size   : 4
     <77>   DW_AT_encoding    : 5        (signed)

Import from line 6 is not importing 0x75 as gcc reports. It is importing 
0x58. In which case the imported_name would be B.

Will open a gcc bug :)

Sami

  reply	other threads:[~2009-06-17 15:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 18:07 using directive patch Sami Wagiaalla
2008-09-05 19:15 ` Tom Tromey
2008-09-08 15:18   ` Sami Wagiaalla
2008-09-07 18:37 ` Jan Kratochvil
2008-09-08 15:16   ` Sami Wagiaalla
2008-09-08 15:31     ` Jan Kratochvil
2008-09-18 21:14   ` DW_TAG_imported_declaration DW_TAG_base_type w/o DW_AT_name [Re: using directive patch] Jan Kratochvil
2009-06-16 15:14     ` Sami Wagiaalla
2009-06-16 18:16       ` Tom Tromey
2009-06-16 20:38         ` Jan Kratochvil
2009-06-17 15:02           ` Sami Wagiaalla [this message]
2009-06-17 16:42           ` Tom Tromey
2009-06-19 16:46             ` Jan Kratochvil
2008-09-10 19:03 ` using directive patch Sami Wagiaalla
2008-09-16 16:54   ` Tom Tromey

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=4A390543.4040109@redhat.com \
    --to=swagiaal@redhat.com \
    --cc=archer@sourceware.org \
    --cc=dseketel@redhat.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@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).