Hi folks!
Could someone explain to me a few things about the
SYM_CLASS_* and TYPE_CLASS_* macros?
E.g. where do things like char, short, void struct, bit,
bitfield fall into?
What would be a “cardinal class type”?
Thank you.
_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev
Hi Stefan,
> E.g.
where do things like char, short, void struct, bit, bitfield
fall into?
Take a look at Dwarf3 specs, page 65.
(http://dwarfstd.org/doc/Dwarf3.pdf)
You'll got an AT_base_type with an encoding.
Depending of the encoding, you can have a boolean, an address.
(page 146).
symbols_elf.c / get_symbol_type_class will decypher a Symbol object
to return it's class.
For instance, on linux, compile a program with debug info and do
readelf -wi
<1><141>: Abbrev Number: 2 (DW_TAG_subprogram)
<142> DW_AT_external : 1
<143> DW_AT_name : (indirect string, offset:
0x169): usrRtpAppInit
<147> DW_AT_decl_file : 1
<148> DW_AT_decl_line : 25
<149> DW_AT_prototyped : 1
<14a> DW_AT_low_pc : 0x100044
<14e> DW_AT_high_pc : 0x100048
That describes a function. Look in get_symbol_type_class, it will
convert the TAG_subprogram as TYPE_CLASS_FUNCTION.
Same logic applies for data types like ARRAY, ENUMERATION.
> What
would be a “cardinal class type”?
get_symbol_type sees :
DW_ATE_unsigned_char unsigned (character) as cardinal.
I'm not 100% sure what a cardinal type means but cardinal is
number used for counting.
Hope it helps a little,
Very Best Regards,
Xavier.
|