工具/软件:TI C/C++编译器
大家好
我使用 ofd2000.exe 获取变量的类型信息。 为此、我调用 ofd2000、如下所示:
ofd2000.exe -g -dwarf_display=none、dinfo、类型-obj_display=none -o output.ofd input.out
DWARF 版本3。
在 CGT 16.9.x 之前、变量"MyStructureProcedess"的输出如下所示:
0000ea80 57 DW_TAG_variable (.ebss)
0000ea81 DW_AT 位置 DW_OP_addr 0x0000d3b0
0000ea87 DW_IT_NAME MyStructureProcess
0000ea95 DW_at_type .debug_info (125)+ 0xf2cb
0000ea99 DW_at_TI_symbol_name _MyStructureProcess
和
0000f2cb 20 DW_TAG_typedef
0000f2cc DW_at_name my_structure_process
0000f2db DW_AT 语言 DW_LANG_C
0000f2dc dw_at_type .debug_info (125)+ 0xf16e
和
0000f16e 14 DW_TAG_structure_type
0000f16f DW_at_sibing .debug_info (125)+ 0xf2cb
0000f173 dw_at_name my_structure_process
0000f183 DW_at_Byte_size 16.
0000f184 8 DW_TAG_member
0000f185 DW_IT_NAME ActiveDischargeEnabled
0000f19c DW_AT 可访问 性1.
此处列出了所有成员
(笑声)
在解析输出时、我将从偏移量转到偏移量、并确实找到 typedef。
由于18.1.x、输出为:
0000EE2 57 DW_TAG_variable (.ebss)
0000ee3 DW_AT 位置 DW_OP_addr 0x00d3b0
0000ee9 DW_IT_NAME MyStructureProcess
0000eef7 DW_at_type .debug_info (125)+ 0x63267 ->输出文件中不存在此偏移!
0000eefb DW_at_TI_symbol_name _MyStructureProcess
结构体定义从0xf5c6开始、但我不知道原因。 它看起来是这样的
0000f5c6 14 DW_TAG_structure_type
0000f5c7 dw_at_sibing .debug_info (125)+ 0x63267
0000f5cb dw_at_name my_structure_process
0000f5db DW 在字节大小16
0000f5dc 8 DW_TAG_member
0000f5dd DW_IT_NAME ActiveDischargeEnabled
0000f5f4 DW_AT 可访问 性1.
CGT 18.1.x 的 ofd2000.exe 输出是否符合预期且正确?
0x63267指的是什么?
感谢您分享您的知识!
此致
Roger