public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/37982]  New: Extranious DW_TAG_variable tag
@ 2008-10-31 19:05 swagiaal at redhat dot com
  2008-10-31 19:07 ` [Bug debug/37982] " swagiaal at redhat dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: swagiaal at redhat dot com @ 2008-10-31 19:05 UTC (permalink / raw)
  To: gcc-bugs

The attached test case compiled thus: g++ -g class.c class2.c -o class

produces the following debuginfo:

 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    < c>   DW_AT_producer    : (indirect string, offset: 0x36): GNU C++ 4.3.0
20080428 (Red Hat 4.3.0-8)        
    <10>   DW_AT_language    : 4        (C++)
    <11>   DW_AT_name        : (indirect string, offset: 0x0): class.c  
    <15>   DW_AT_comp_dir    : (indirect string, offset: 0x19):
/notnfs/swagiaal/tests/class    
    <19>   DW_AT_low_pc      : 0x40055c 
    <21>   DW_AT_high_pc     : 0x400568 
    <29>   DW_AT_stmt_list   : 0x0      
 <1><2d>: Abbrev Number: 2 (DW_TAG_class_type)
    <2e>   DW_AT_name        : A        
    <30>   DW_AT_byte_size   : 1        
    <31>   DW_AT_decl_file   : 2        
    <32>   DW_AT_decl_line   : 4        
    <33>   DW_AT_sibling     : <0x49>   
 <2><37>: Abbrev Number: 3 (DW_TAG_variable)
    <38>   DW_AT_name        : (indirect string, offset: 0x5f): elsewhere       
    <3c>   DW_AT_decl_file   : 2        
    <3d>   DW_AT_decl_line   : 6        
    <3e>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x8):
_ZN1A9elsewhereE    
    <42>   DW_AT_type        : <0x49>   
    <46>   DW_AT_external    : 1        
    <47>   DW_AT_declaration : 1        
[...]
 <1><86>: Abbrev Number: 3 (DW_TAG_variable)
    <87>   DW_AT_name        : (indirect string, offset: 0x5f): elsewhere       
    <8b>   DW_AT_decl_file   : 2        
    <8c>   DW_AT_decl_line   : 6        
    <8d>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x8):
_ZN1A9elsewhereE    
    <91>   DW_AT_type        : <0x49>   
    <95>   DW_AT_external    : 1        
    <96>   DW_AT_declaration : 1        

[...]


 <0><a3>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <a4>   DW_AT_producer    : (indirect string, offset: 0x36): GNU C++ 4.3.0
20080428 (Red Hat 4.3.0-8)        
    <a8>   DW_AT_language    : 4        (C++)
    <a9>   DW_AT_name        : (indirect string, offset: 0x6e): class2.c        
    <ad>   DW_AT_comp_dir    : (indirect string, offset: 0x19):
/notnfs/swagiaal/tests/class    
    <b1>   DW_AT_low_pc      : 0x400568 
    <b9>   DW_AT_high_pc     : 0x400568 
    <c1>   DW_AT_stmt_list   : 0x46     
 <1><c5>: Abbrev Number: 2 (DW_TAG_class_type)
    <c6>   DW_AT_name        : A        
    <c8>   DW_AT_byte_size   : 1        
    <c9>   DW_AT_decl_file   : 1        
    <ca>   DW_AT_decl_line   : 4        
    <cb>   DW_AT_sibling     : <0xe1>   
 <2><cf>: Abbrev Number: 3 (DW_TAG_variable)
    <d0>   DW_AT_name        : (indirect string, offset: 0x5f): elsewhere       
    <d4>   DW_AT_decl_file   : 1        
    <d5>   DW_AT_decl_line   : 6        
    <d6>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x8):
_ZN1A9elsewhereE    
    <da>   DW_AT_type        : <0xe1>   
    <de>   DW_AT_external    : 1        
    <df>   DW_AT_declaration : 1        
[...]
 <1><ed>: Abbrev Number: 6 (DW_TAG_variable)
    <ee>   DW_AT_specification: <0xcf>  
    <f2>   DW_AT_decl_file   : 2        
    <f3>   DW_AT_decl_line   : 4        
    <f4>   DW_AT_location    : 9 byte block: 3 68 6 40 0 0 0 0 0       
(DW_OP_addr: 400668)
[...]
 The File Name Table:
  Entry Dir     Time    Size    Name
  1     0       0       0       class.c
  2     0       0       0       class.h
[...]
 The File Name Table:
  Entry Dir     Time    Size    Name
  1     0       0       0       class.h
  2     0       0       0       class2.c

As can be seen from the debug info there is an extra die (0x86).
This die is misleading to the debugger. In that compile unit there
are two die's representing declarations of the variable 'elsewhere'
0x37 and 0x86. The second one is in the incorrect scope and has no
reference to the correct die.

Please advise.

Thanks


-- 
           Summary: Extranious DW_TAG_variable tag
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: swagiaal at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37982


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-03-18 12:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-31 19:05 [Bug debug/37982] New: Extranious DW_TAG_variable tag 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 ` [Bug debug/37982] Extraneous " dodji at gcc dot gnu dot org
2008-11-28  1:38 ` 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

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).