public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/56805] New: DW_AT_typedef missing when -fdebug-types-section is used (and -fno-eliminate-unused-debug-types)
@ 2013-04-01 23:25 jan.smets@alcatel-lucent.com
  2013-04-01 23:33 ` [Bug debug/56805] " jan.smets@alcatel-lucent.com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2013-04-01 23:25 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56805
           Summary: DW_AT_typedef missing when -fdebug-types-section is
                    used (and -fno-eliminate-unused-debug-types)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jan.smets@alcatel-lucent.com


typedef struct
{
    char  b[4];
} some_typedef_name;

typedef some_typedef_name joske;

int main()
{
    return 0;
}

Compiled with :
-gdwarf-4 -fno-var-tracking-assignments -fno-eliminate-unused-debug-types
-fdebug-types-section


Contents of the .debug_types section:

  Compilation Unit @ offset 0x0:
   Length:        0x4f (32-bit)
   Version:       4
   Abbrev Offset: 0
   Pointer Size:  4
   Signature:     86cb53f6d82bc2c9
   Type Offset:   0x1d
 <0><17>: Abbrev Number: 1 (DW_TAG_type_unit)
    <18>   DW_AT_language    : 4    (C++)
    <19>   DW_AT_stmt_list   : 0x0
 <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type)
    <1e>   DW_AT_byte_size   : 4
    <1f>   DW_AT_decl_file   : 1
    <20>   DW_AT_decl_line   : 2
    <21>   DW_AT_linkage_name: (indirect string, offset: 0x0):
17some_typedef_name
    <25>   DW_AT_sibling     : <0x34>
 <2><29>: Abbrev Number: 3 (DW_TAG_member)
    <2a>   DW_AT_name        : b
    <2c>   DW_AT_decl_file   : 1
    <2d>   DW_AT_decl_line   : 3
    <2e>   DW_AT_type        : <0x34>
    <32>   DW_AT_data_member_location: 0
 <1><34>: Abbrev Number: 4 (DW_TAG_array_type)
    <35>   DW_AT_type        : <0x44>
    <39>   DW_AT_sibling     : <0x44>
 <2><3d>: Abbrev Number: 5 (DW_TAG_subrange_type)
    <3e>   DW_AT_type        : <0x4b>
    <42>   DW_AT_upper_bound : 3
 <1><44>: Abbrev Number: 6 (DW_TAG_base_type)
    <45>   DW_AT_byte_size   : 1
    <46>   DW_AT_encoding    : 6    (signed char)
    <47>   DW_AT_name        : (indirect string, offset: 0x14): char
 <1><4b>: Abbrev Number: 6 (DW_TAG_base_type)
    <4c>   DW_AT_byte_size   : 4
    <4d>   DW_AT_encoding    : 7    (unsigned)
    <4e>   DW_AT_name        : (indirect string, offset: 0x19): sizetype

Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x48 (32-bit)
   Version:       4
   Abbrev Offset: 0
   Pointer Size:  4
 <0><b>: Abbrev Number: 7 (DW_TAG_compile_unit)
    <c>   DW_AT_producer    : (indirect string, offset: 0x27): GNU C++ 4.8.0
    <10>   DW_AT_language    : 4    (C++)
    <11>   DW_AT_name        : (indirect string, offset: 0x103): /tmp/dwarf.c
    <15>   DW_AT_low_pc      : 0x0
    <19>   DW_AT_high_pc     : 0x24
    <1d>   DW_AT_stmt_list   : 0x0
 <1><21>: Abbrev Number: 6 (DW_TAG_base_type)
    <22>   DW_AT_byte_size   : 4
    <23>   DW_AT_encoding    : 7    (unsigned)
    <24>   DW_AT_name        : (indirect string, offset: 0x19): sizetype
 <1><28>: Abbrev Number: 6 (DW_TAG_base_type)
    <29>   DW_AT_byte_size   : 1
    <2a>   DW_AT_encoding    : 6    (signed char)
    <2b>   DW_AT_name        : (indirect string, offset: 0x14): char
 <1><2f>: Abbrev Number: 8 (DW_TAG_subprogram)
    <30>   DW_AT_external    : 1
    <30>   DW_AT_name        : (indirect string, offset: 0x22): main
    <34>   DW_AT_decl_file   : 1
    <35>   DW_AT_decl_line   : 7
    <36>   DW_AT_type        : <0x44>
    <3a>   DW_AT_low_pc      : 0x0
    <3e>   DW_AT_high_pc     : 0x24
    <42>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <44>   DW_AT_GNU_all_call_sites: 1
 <1><44>: Abbrev Number: 9 (DW_TAG_base_type)
    <45>   DW_AT_byte_size   : 4
    <46>   DW_AT_encoding    : 5    (signed)
    <47>   DW_AT_name        : int


without  -fdebug-types-section (note the DW_AT_typedef for 'some_typedef_name'
and 'joske')

Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x85 (32-bit)
   Version:       4
   Abbrev Offset: 0
   Pointer Size:  4
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <c>   DW_AT_producer    : (indirect string, offset: 0x2c): GNU C++ 4.8.0
   <10>   DW_AT_language    : 4    (C++)
    <11>   DW_AT_name        : (indirect string, offset: 0x105): /tmp/dwarf.c
    <15>   DW_AT_low_pc      : 0x0
    <19>   DW_AT_high_pc     : 0x24
    <1d>   DW_AT_stmt_list   : 0x0
 <1><21>: Abbrev Number: 2 (DW_TAG_structure_type)
    <22>   DW_AT_byte_size   : 4
    <23>   DW_AT_decl_file   : 1
    <24>   DW_AT_decl_line   : 2
    <25>   DW_AT_linkage_name: (indirect string, offset: 0x18):
17some_typedef_name
    <29>   DW_AT_sibling     : <0x38>
 <2><2d>: Abbrev Number: 3 (DW_TAG_member)
    <2e>   DW_AT_name        : b
    <30>   DW_AT_decl_file   : 1
    <31>   DW_AT_decl_line   : 3
    <32>   DW_AT_type        : <0x38>
    <36>   DW_AT_data_member_location: 0
 <1><38>: Abbrev Number: 4 (DW_TAG_array_type)
    <39>   DW_AT_type        : <0x4f>
    <3d>   DW_AT_sibling     : <0x48>
 <2><41>: Abbrev Number: 5 (DW_TAG_subrange_type)
    <42>   DW_AT_type        : <0x48>
    <46>   DW_AT_upper_bound : 3
 <1><48>: Abbrev Number: 6 (DW_TAG_base_type)
    <49>   DW_AT_byte_size   : 4
    <4a>   DW_AT_encoding    : 7    (unsigned)
    <4b>   DW_AT_name        : (indirect string, offset: 0xf2): sizetype
 <1><4f>: Abbrev Number: 6 (DW_TAG_base_type)
    <50>   DW_AT_byte_size   : 1
    <51>   DW_AT_encoding    : 6    (signed char)
    <52>   DW_AT_name        : (indirect string, offset: 0x100): char
 <1><56>: Abbrev Number: 7 (DW_TAG_typedef)
    <57>   DW_AT_name        : (indirect string, offset: 0x0):
some_typedef_name
    <5b>   DW_AT_decl_file   : 1
    <5c>   DW_AT_decl_line   : 4
    <5d>   DW_AT_type        : <0x21>
 <1><61>: Abbrev Number: 7 (DW_TAG_typedef)
    <62>   DW_AT_name        : (indirect string, offset: 0x12): joske
    <66>   DW_AT_decl_file   : 1
    <67>   DW_AT_decl_line   : 6
    <68>   DW_AT_type        : <0x56>
 <1><6c>: Abbrev Number: 8 (DW_TAG_subprogram)
    <6d>   DW_AT_external    : 1
    <6d>   DW_AT_name        : (indirect string, offset: 0xfb): main
    <71>   DW_AT_decl_file   : 1
    <72>   DW_AT_decl_line   : 7
    <73>   DW_AT_type        : <0x81>
    <77>   DW_AT_low_pc      : 0x0
    <7b>   DW_AT_high_pc     : 0x24
    <7f>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <81>   DW_AT_GNU_all_call_sites: 1
 <1><81>: Abbrev Number: 9 (DW_TAG_base_type)
    <82>   DW_AT_byte_size   : 4
    <83>   DW_AT_encoding    : 5    (signed)
    <84>   DW_AT_name        : int


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

end of thread, other threads:[~2013-09-03  9:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-01 23:25 [Bug debug/56805] New: DW_AT_typedef missing when -fdebug-types-section is used (and -fno-eliminate-unused-debug-types) jan.smets@alcatel-lucent.com
2013-04-01 23:33 ` [Bug debug/56805] " jan.smets@alcatel-lucent.com
2013-04-02 17:40 ` [Bug debug/56805] DW_TAG_typedef " ccoutant at gcc dot gnu.org
2013-04-02 18:11 ` jan.smets@alcatel-lucent.com
2013-04-02 20:35 ` ccoutant at gcc dot gnu.org
2013-04-02 20:36 ` ccoutant at gcc dot gnu.org
2013-04-02 21:28 ` jan.smets@alcatel-lucent.com
2013-04-12  9:38 ` jan.smets@alcatel-lucent.com
2013-09-03  9:01 ` jan.smets@alcatel-lucent.com

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