[arm-gnu] .debug_type missing from elf output

Carlos O'Donell carlos_odonell at mentor.com
Wed Apr 11 17:41:36 UTC 2012


On 3/23/2012 9:35 AM, Leo Havmøller wrote:
> With arm-2011.09-69-arm-none-eabi, the entire .debug_types section is missing from the elf output (compiling with –gdwarf-4).
> 
> OK with arm-2011.03-42-arm-none-eabi.

I can't reproduce that with a simple application, and you haven't provided enough information for anyone else to verify.

With 2011.09-69:

struct s
{
  int x;
  int y : 5;
  int z;
};
struct s i;

int main (void)
{
}

arm-none-eabi-gcc -gdwarf-4 -T generic-hosted.ld -o test test.c
arm-none-eabi-readelf -a test | grep types
  [13] .debug_types      PROGBITS        00000000 008e8e 000051 00      0   0  1

arm-none-eabi-objdump --dwarf test
...
Contents of the .debug_types section:

  Compilation Unit @ offset 0x0:
   Length:        0x4d (32-bit)
   Version:       4
   Abbrev Offset: 0
   Pointer Size:  4
   Signature:     a5e49293c4185192
   Type Offset:   0x1d
 <0><17>: Abbrev Number: 1 (DW_TAG_type_unit)
    <18>   DW_AT_language    : 1        (ANSI C)
    <19>   DW_AT_stmt_list   : 0x0
 <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type)
    <1e>   DW_AT_name        : s
    <20>   DW_AT_byte_size   : 12
    <21>   DW_AT_decl_file   : 1
    <22>   DW_AT_decl_line   : 1
    <23>   DW_AT_sibling     : <0x49>
 <2><27>: Abbrev Number: 3 (DW_TAG_member)
    <28>   DW_AT_name        : x
    <2a>   DW_AT_decl_file   : 1
    <2b>   DW_AT_decl_line   : 3
    <2c>   DW_AT_type        : <0x49>
    <30>   DW_AT_data_member_location: 0
 <2><31>: Abbrev Number: 4 (DW_TAG_member)
    <32>   DW_AT_name        : y
    <34>   DW_AT_decl_file   : 1
    <35>   DW_AT_decl_line   : 4
    <36>   DW_AT_type        : <0x49>
    <3a>   DW_AT_byte_size   : 4
    <3b>   DW_AT_bit_size    : 5
    <3c>   DW_AT_bit_offset  : 27
    <3d>   DW_AT_data_member_location: 4
 <2><3e>: Abbrev Number: 3 (DW_TAG_member)
    <3f>   DW_AT_name        : z
    <41>   DW_AT_decl_file   : 1
    <42>   DW_AT_decl_line   : 5
    <43>   DW_AT_type        : <0x49>
    <47>   DW_AT_data_member_location: 8
 <1><49>: Abbrev Number: 5 (DW_TAG_base_type)
    <4a>   DW_AT_byte_size   : 4
    <4b>   DW_AT_encoding    : 5        (signed)
    <4c>   DW_AT_name        : int
...

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell at mentor.com
carlos at codesourcery.com
+1 (613) 963 1026



More information about the arm-gnu mailing list