vmt / udis86

Disassembler Library for x86 and x86-64
http://udis86.sourceforge.net
BSD 2-Clause "Simplified" License
1.02k stars 299 forks source link

Feature request: expose ud_syn_rel_target (or equivalent functionality) #110

Open BenHenning opened 8 years ago

BenHenning commented 8 years ago

Hello,

I'm currently writing a C++ code coverage tool and using libudis86 as a disassembly library. It is working perfectly and is really efficient. However, to maintain efficiency, I've turned off translation, but it seems to me that translation is the only way to get the absolute address for instructions such as CALL and JMP. I noticed that ud_syn_rel_target in syn.h is used to return the proper relative addressed from the instruction operand, however this function is only used when translating instructions to strings and is not exposed to calling code (which might need this absolute address, such as in my case).

I've temporarily modified my local copy of libudis86 to expose this function for external linkage, but I wanted to request this functionality be exposed within the official distribution of the library, if possible. I'm happy to make the change myself, but I'm also not entirely sure whether exposing this is desired by the team or whether there is a better alternative to accomplishing what I need to do here.

Thanks!