Specify address via parameter

This allows to decode instructions where the address of the buffer is
not the address of the instruction.
This commit is contained in:
Alexis Engelke
2019-01-14 19:52:03 +01:00
parent 55f6fda583
commit a799024066
3 changed files with 8 additions and 5 deletions

View File

@@ -131,7 +131,8 @@ typedef struct Instr Instr;
#define INSTR_HAS_REX(instr) ((instr)->flags & INSTR_FLAG_REX)
#define INSTR_HAS_VEXL(instr) ((instr)->flags & INSTR_FLAG_VEXL)
int decode(const uint8_t* buffer, int len, DecodeMode mode, Instr* out_instr);
int decode(const uint8_t* buffer, int len, DecodeMode mode, uintptr_t address,
Instr* out_instr);
void instr_format(const Instr* instr, char buffer[128]);
#endif