|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.debugger - DWARF output, type of char[]?
What is the DWARF type of char[], as output by the DMD backend?
I have compiled this sample:
import std.stdio;
int main()
{
char[] greet = "Hello";
writefln(greet);
return 0;
}
Then ran
readelf -w hello
As shown in this snippet, the type of greet is unsigned long long (entry at
offset <c2>):
<1><c2>: Abbrev Number: 2 (DW_TAG_base_type)
DW_AT_name : unsigned long long
DW_AT_byte_size : 8
DW_AT_encoding : 7 (unsigned)
<1><d8>: Abbrev Number: 4 (DW_TAG_subprogram)
DW_AT_sibling : <104>
DW_AT_name : _Dmain
DW_AT_decl_file : 1
DW_AT_decl_line : 3
DW_AT_type : <bb>
DW_AT_low_pc : 0x804a358
DW_AT_high_pc : 0x804a383
DW_AT_frame_base : 1 byte block: 55 (DW_OP_reg5)
<2><f5>: Abbrev Number: 3 (DW_TAG_variable)
DW_AT_name : greet
DW_AT_type : <c2>
DW_AT_location : 2 byte block: 91 78 (DW_OP_fbreg: -8)
Apr 02 2007
|