Tool/software: TI C/C++ Compiler
Hello everyone
I have a problem. I want to get structure members addresses from an "*.out" file. I guess, i have to use "ofd2000" for this to extract DWARF info and then parse it somehow. But I get stuck with the format.
For a simple program with two variable "iVar" (int) and "fVar" (float) i get something like this:
00000098 23 DW_TAG_variable (.ebss) 00000099 DW_AT_location DW_OP_addr 0x00a806 0000009f DW_AT_name iVar 000000a4 DW_AT_external true 000000a5 DW_AT_type .debug_info(20) + 0x294 000000a9 DW_AT_TI_symbol_name _iVar 000000af 23 DW_TAG_variable (.ebss) 000000b0 DW_AT_location DW_OP_addr 0x00a808 000000b6 DW_AT_name fVar 000000bb DW_AT_external true 000000bc DW_AT_type .debug_info(20) + 0x389 000000c0 DW_AT_TI_symbol_name _fVar
So i thought that I should inspect fields with numbers "0x294" and "0x389" to get types. But there is no such info. Actually types description is in another place:
00000177 14 DW_TAG_base_type 00000178 DW_AT_name float 0000017e DW_AT_byte_size 2 0000017f DW_AT_encoding DW_ATE_float
0000011a 14 DW_TAG_base_type 0000011b DW_AT_name int 0000011f DW_AT_byte_size 1 00000120 DW_AT_encoding DW_ATE_signed
How are these numbers connected: "0x294 <-> 0x11a" and "0x389 <-> 0x177" ?
Thanks