Hello,
I would like to make a small version of dwarfdump to obtain the desired debug information of process.
libdwarf has a example called "simplereader" to read dwarf information but I have not enought information about how to make it.
For example:
dwarfdump give me this information......
Quote:
< 1><0x000000b9> DW_TAG_base_type
DW_AT_byte_size 0x00000004
DW_AT_encoding DW_ATE_float
DW_AT_name "float"
|
And simplereader example return me the follow line....
Quote:
<1> tag: 36 DW_TAG_base_type name: "float"
|
How can I obtain, for example byte size?
Other example...
Quote:
< 1><0x00001523> DW_TAG_variable
DW_AT_name "INDEX_TXPDO"
DW_AT_decl_file 0x0000000a
DW_AT_decl_line 0x00000011
DW_AT_type <0x00001513>
DW_AT_external yes(1)
DW_AT_location DW_OP_addr 0x08171e40
|
And simplereader return me.......
Quote:
<1> tag: 52 DW_TAG_variable name: "INDEX_TXPDO"
|
How can I obtain name, type and location??
Best regards
John Martin.