This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: less dwarf2 debug info stored in .o on ia64
- From: Rens Sankar <rens dot sankar at wipro dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>, binutils at sources dot redhat dot com, rth at redhat dot com, wilson at specifixinc dot com
- Date: Fri, 09 Jan 2004 18:11:33 +0530
- Subject: Re: less dwarf2 debug info stored in .o on ia64
- References: <3FFBA452.4010105@wipro.com> <D3B29F79-4195-11D8-BC6A-000393A91CAA@apple.com>
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.