将操作数定义为偏移量
逆向工程
艾达
蟒蛇
2021-06-25 14:38:13
2个回答
红色高亮通常表示地址无效。您需要创建一个覆盖目标地址范围的段,以便将其显示为标签。
我设法通过使用以下 idapython 代码解决了这个问题:
operand_value = get_operand_value(address, 1)
for segment in Segments():
if operand_value >= segment and operand_value <= SegEnd(segment):
op_hex(address, 1)
op_offset(address, 1, idaapi.REF_OFF32, -1, 0, 0)

