From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Nenad Vukicevic <nenad@intrepid.com>
Cc: Gary Funck <gary@intrepid.com>, GCC List <gcc@gcc.gnu.org>
Subject: Re: dwarf2 - multiple DW_TAG_variable for global variable
Date: Sun, 10 Jan 2010 08:43:00 -0000 [thread overview]
Message-ID: <20100110084320.GA31189@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <4B4911EC.1050102@intrepid.com>
On Sun, 10 Jan 2010 00:31:56 +0100, Nenad Vukicevic wrote:
...
> <1><54>: Abbrev Number: 4 (DW_TAG_variable)
> <55> DW_AT_name : (indirect string, offset: 0x38): xxxxx
> <59> DW_AT_decl_file : 1
> <5a> DW_AT_decl_line : 1
> <5b> DW_AT_type : <0x4d>
> <5f> DW_AT_external : 1
> <60> DW_AT_declaration : 1
> <1><61>: Abbrev Number: 5 (DW_TAG_variable)
> <62> DW_AT_name : (indirect string, offset: 0x38): xxxxx
> <66> DW_AT_decl_file : 1
> <67> DW_AT_decl_line : 1
> <68> DW_AT_type : <0x4d>
> <6c> DW_AT_external : 1
> <6d> DW_AT_location : 9 byte block: 3 0 0 0 0 0 0 0 0 (DW_OP_addr: 0)
>
> in 4.4.1 and 4.5 releases.
>
> Any idea if this is a correct dwarf? Or must be treated as a
> duplicate somehow?
It does not hurt much GDB - if the debugger ignores the second definition it
looks as a declaration of external symbol and it gets correctly looked up
through the ELF (not DWARF) .symtab symbol without using DW_AT_location.
PR 39524 mentions a special scope case which gets broken by it but in common
cases it works fine.
Regards,
Jan
prev parent reply other threads:[~2010-01-10 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 7:34 Nenad Vukicevic
2010-01-09 20:40 ` Nenad Vukicevic
2010-01-09 21:02 ` Gary Funck
2010-01-09 21:18 ` Jan Kratochvil
2010-01-09 23:32 ` Nenad Vukicevic
2010-01-10 8:43 ` Jan Kratochvil [this message]
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=20100110084320.GA31189@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gary@intrepid.com \
--cc=gcc@gcc.gnu.org \
--cc=nenad@intrepid.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).