I faced an error "ERROR: ctfconvert: die 37: base type without name"
when run ctfconvert on some object files which were produced by gcc-4.4.2

The error like this:
/opt/onbld/bin/i386/ctfconvert -g -l NDISWRAPPER example.o                    
ERROR: ctfconvert: die 37: base type without name

I prepared a small example file and compile it with command line
gcc -g -O2 -o example.o -c example.c and two versions of gcc - 4.4.2 and 3.4.3
Then I run dwarfdump example.o on files produced by 4.4.2 and by 3.4.3

$ cat example.c
#include <sys/types.h>

int main()
{
 return 0;
}

Below the file from dwarfdump that was produced by gcc 4.4.2
.debug_info

COMPILE_UNIT<header overall offset = 0>:
<0><   11>      DW_TAG_compile_unit
                DW_AT_producer              GNU C 4.4.2
                DW_AT_language              DW_LANG_C89
                DW_AT_name                  example.c
                DW_AT_comp_dir              /home/unix/Documents/bugs
                DW_AT_low_pc                0
                DW_AT_high_pc               0x3
                DW_AT_stmt_list             0

LOCAL_SYMBOLS:
<1><   37>      DW_TAG_base_type
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned
<1><   40>      DW_TAG_base_type
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_signed
                DW_AT_name                  long int
<1><   47>      DW_TAG_base_type
...


And here the file from gcc-3.4.3
.debug_info

COMPILE_UNIT<header overall offset = 0>:
<0><   11>      DW_TAG_compile_unit
                DW_AT_stmt_list             0
                DW_AT_high_pc               0x10
                DW_AT_low_pc                0
                DW_AT_producer              GNU C 3.4.3
(csl-sol210-3_4-20050802)
                DW_AT_language              DW_LANG_C89
                DW_AT_name                  example.c
                DW_AT_comp_dir              /home/unix/Documents/bugs

LOCAL_SYMBOLS:
<1><   37>      DW_TAG_base_type
                DW_AT_name                  unsigned int
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned
<1><   44>      DW_TAG_base_type
                DW_AT_name                  long int
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_signed
...


The DIE describing base type from 3.4.3 contains DW_AT_name.
<1><   37>      DW_TAG_base_type
                DW_AT_name                  unsigned int
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned

but the same DIE from 4.4.2 doesn't contain DW_AT_name
<1><   37>      DW_TAG_base_type
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned


-- 
           Summary: incorrect dwarf data gcc-4.4.2
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: YLitvinenko at astana dot oilfield dot slb dot com
 GCC build triplet: i386-pc-solaris2.11
  GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11


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

Reply via email to