dwarf2cpp
dwarf2cpp copied to clipboard
Support for MetroWerkz extensions to DWARF
The MetroWerkz compiler contains a number of extension attributes which provide a little more information about the original sources:
// tags
TAG_MW_overlay_branch = 0x4080,
// attributes
AT_MW_mangled = 0x2000 | FORM_STRING,
AT_MW_restore_SP = 0x2010 | FORM_BLOCK2,
AT_MW_global_ref = 0x2020 | FORM_REF,
AT_MW_global_ref_by_name = 0x2030 | FORM_STRING,
AT_MW_restore_S0 = 0x2040 | FORM_BLOCK2,
AT_MW_restore_S1 = 0x2050 | FORM_BLOCK2,
AT_MW_restore_S2 = 0x2060 | FORM_BLOCK2,
AT_MW_restore_S3 = 0x2070 | FORM_BLOCK2,
AT_MW_restore_S4 = 0x2080 | FORM_BLOCK2,
AT_MW_restore_S5 = 0x2090 | FORM_BLOCK2,
AT_MW_restore_S6 = 0x20A0 | FORM_BLOCK2,
AT_MW_restore_S7 = 0x20B0 | FORM_BLOCK2,
AT_MW_restore_S8 = 0x20C0 | FORM_BLOCK2,
AT_MW_restore_F20 = 0x20D0 | FORM_BLOCK2,
AT_MW_restore_F21 = 0x20E0 | FORM_BLOCK2,
AT_MW_restore_F22 = 0x20F0 | FORM_BLOCK2,
AT_MW_restore_F23 = 0x2100 | FORM_BLOCK2,
AT_MW_restore_F24 = 0x2110 | FORM_BLOCK2,
AT_MW_restore_F25 = 0x2120 | FORM_BLOCK2,
AT_MW_restore_F26 = 0x2130 | FORM_BLOCK2,
AT_MW_restore_F27 = 0x2140 | FORM_BLOCK2,
AT_MW_restore_F28 = 0x2150 | FORM_BLOCK2,
AT_MW_restore_F29 = 0x2160 | FORM_BLOCK2,
AT_MW_restore_F30 = 0x2170 | FORM_BLOCK2,
AT_MW_restore_D20 = 0x2180 | FORM_BLOCK2,
AT_MW_restore_D21 = 0x2190 | FORM_BLOCK2,
AT_MW_restore_D22 = 0x21A0 | FORM_BLOCK2,
AT_MW_restore_D23 = 0x21B0 | FORM_BLOCK2,
AT_MW_restore_D24 = 0x21C0 | FORM_BLOCK2,
AT_MW_restore_D25 = 0x21D0 | FORM_BLOCK2,
AT_MW_restore_D26 = 0x2240 | FORM_BLOCK2,
AT_MW_restore_D27 = 0x2250 | FORM_BLOCK2,
AT_MW_restore_D28 = 0x2260 | FORM_BLOCK2,
AT_MW_restore_D29 = 0x2270 | FORM_BLOCK2,
AT_MW_restore_D30 = 0x2280 | FORM_BLOCK2,
AT_MW_overlay_id = 0x2290 | FORM_DATA4,
AT_MW_overlay_name = 0x22A0 | FORM_STRING,
AT_MW_global_refs_block = 0x2300 | FORM_BLOCK2,
AT_MW_local_spoffset = 0x2310 | FORM_BLOCK4,
AT_MW_MIPS16 = 0x2330 | FORM_STRING,
AT_MW_DWARF2_location = 0x2340 | FORM_BLOCK2,
// fundamental types
FT_MW_long_long = 0x18,
FT_MW_signed_long_long = 0x19,
FT_MW_unsigned_long_long = 0x1A,
FT_MW_fixed_vector_8x8 = 0xA408,
FT_MW_int128 = 0xA510,
FT_MW_signed_int_16x8 = 0xA610,
FT_MW_signed_int_8x16 = 0xA710,
FT_MW_signed_int_4x32 = 0xA810,
FT_MW_unsigned_int_16x8 = 0xA910,
FT_MW_unsigned_int_8x16 = 0xAA10,
FT_MW_unsigned_int_4x32 = 0xAB10,
FT_MW_vec2x32float = 0xAC00,
// locations
OP_MW_FPREG = 0x80,
OP_MW_FPDREG = 0x81,
OP_MW_DREF8 = 0x82,
Not all of these would be particularly useful for C/C++ header generation, but AT_global_ref, AT_global_ref_by_name, AT_global_refs_block and the additional fundamental types would likely allow for slightly more informative output. Including overlay information in the output via AT_overlay_id and AT_overlay_name may also be useful.