This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: less dwarf2 debug info stored in .o on ia64


Hi,

Thanks Devang, "-fno-eliminate-unused-debug-types" works by adding more debug info to .o file, but information of some particular type of members seems to be not stored.
For example, consider the following C code:


---- file:- test.c ----
#include <stdio.h>

struct hello {
        int integer;
        char character;
        int :32;
        int :32;
} hello;

void dummy(void)
{
}

1) Compiled test.c file...
"gcc -gdwarf-2 -g3 -fno-eliminate-unused-debug-types -c test.c"

2) Analysed with readelf...
readelf -w test.o

3) Output from readelf of symbol "hello"

-------------------------------------------------
 <1><7b4>: Abbrev Number: 14 (DW_TAG_structure_type)
     DW_AT_sibling     : <7dd>
     DW_AT_name        : (indirect string, offset: 0x661): hello
     DW_AT_byte_size   : 16
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 3
 <2><7c0>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_name        : (indirect string, offset: 0x8c6): integer
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 4
     DW_AT_type        : <53>
     DW_AT_data_member_location: 2 byte block: 23 0
(DW_OP_plus_uconst: 0; )
 <2><7ce>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_name        : (indirect string, offset: 0x7c3): character
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 5
     DW_AT_type        : <9c>
     DW_AT_data_member_location: 2 byte block: 23 4     <--- **
(DW_OP_plus_uconst: 4; )
 <1><7dd>: Abbrev Number: 26 (DW_TAG_subprogram)
     DW_AT_external    : 1
     DW_AT_name        : (indirect string, offset: 0x268): dummy
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 11
     DW_AT_prototyped  : 1
     DW_AT_low_pc      : 0 0
     DW_AT_high_pc     : 0x5 5
     DW_AT_frame_base  : 1 byte block: 55       (DW_OP_reg5; )
-------------------------------------------------

**here we can notice the information lose of "int :32", with dwarf-2 it is the same case on i386 also... but stabs on i386 has "int :32" info.

Any idea why these are not stored in dwarf-2?

Thanks,
Rens.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]