Hi,
I am trying to build a CFG of program based on DynamoRio. One question I have is about target address of indirect branch, which is essentially a value stored in register. I notice there is a DynamoRio function called instr_get_target() that can return the target. But I really have no idea about how to get exact value of target address and use it in later part (e.g., in a clean call), since the opnd_t structure is a black box.
Take the code below as an example, how do I deal with the target_opnd variable so that the exact target address can be obtained and used in the clean_call?
DR_ASSERT(instr_is_mbr(instr)); opnd_t target_opnd = instr_get_target(instr);
dr_insert_clean_call(...);
Thanks a lot.