public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dodji at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/37982] Extraneous DW_TAG_variable tag Date: Sat, 01 Nov 2008 11:05:00 -0000 [thread overview] Message-ID: <20081101110352.6587.qmail@sourceware.org> (raw) In-Reply-To: <bug-37982-11288@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2413 bytes --] ------- Comment #4 from dodji at gcc dot gnu dot org 2008-11-01 11:03 ------- I could reproduce this on 4.3 and trunk (4.4). Actually I think there are several problems here. First, I think the DIE representing the defining declaration of A::elsewhere in class2.c should have a DW_AT_specification pointing back to the DIE representing the declaration or A::elsewhere in class.h. That can be deduced from the dwarf2 spec, section [4.1 Data Object Entries], point 5, pdf page 35, spec page 33 that reads: "5. If the variable entry represents the defining declaration for a C++ static data member of a structure, class or union, the entry has a DW_AT_specification attribute, whose value is a reference to the debugging information entry representing the declaration of this data member. The referenced entry will be a child of some class, structure or union type entry.". Second, I think the DIE of the defining declaration of A::elsewhere in class2 should have a DW_AT_const_value attribute whose value should be the constant "211". This can be deduced from the dwarf2 spec, section [4.1 Data Object Entries], point 9, pdf page 35, spec page 33 that reads: "9. An entry describing a variable whose value is constant and not represented by an object in the address space of the program, or an entry describing a named constant, does not have a location attribute. Such entries have a DW_AT_const_value attribute, whose value may be a string or any of the constant data or data block forms, as appropriate for the representation of the variables value. The value of this attribute is the actual constant value of the variable, represented as it would be on the target architecture." And third, as you pointed out, the DIE of the declaration of A::elsewhere should not appear twice in the class.c compilation unit. It should only appear once, in the scope of the A class. -- dodji at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dodji at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-11-01 11:03:52 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37982
next prev parent reply other threads:[~2008-11-01 11:05 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-31 19:05 [Bug debug/37982] New: Extranious " swagiaal at redhat dot com 2008-10-31 19:07 ` [Bug debug/37982] " swagiaal at redhat dot com 2008-10-31 19:08 ` swagiaal at redhat dot com 2008-10-31 19:08 ` swagiaal at redhat dot com 2008-11-01 11:05 ` dodji at gcc dot gnu dot org [this message] 2008-11-28 1:38 ` [Bug debug/37982] Extraneous " jan dot kratochvil at redhat dot com 2008-11-28 16:34 ` swagiaal at redhat dot com 2008-11-29 0:25 ` jan dot kratochvil at redhat dot com 2008-12-01 16:13 ` swagiaal at redhat dot com 2010-03-17 21:15 ` dodji at gcc dot gnu dot org 2010-03-18 12:53 ` dodji at gcc dot gnu dot org 2010-03-18 12:53 ` dodji at gcc dot gnu dot org
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=20081101110352.6587.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).