static int die_get_bit_offset(Dwarf_Die *tp_die) { Dwarf_Word ret; if (die_get_attr_udata(tp_die, DW_AT_bit_offset, &ret)) return 0; return (int)ret; }
static int die_get_byte_size(Dwarf_Die *tp_die) { Dwarf_Word ret; if (die_get_attr_udata(tp_die, DW_AT_byte_size, &ret)) return 0; return (int)ret; }
/** * die_is_signed_type - Check whether a type DIE is signed or not * @tp_die: a DIE of a type * * Get the encoding of @tp_die and return true if the encoding * is signed. */ bool die_is_signed_type(Dwarf_Die *tp_die) { Dwarf_Word ret; if (die_get_attr_udata(tp_die, DW_AT_encoding, &ret)) return false; return (ret == DW_ATE_signed_char || ret == DW_ATE_signed || ret == DW_ATE_signed_fixed); }