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

@@ -72,7 +72,8 @@ main(int argc, char** argv)
while (current_off != length)
{
size_t remaining = length - current_off;
int retval = decode(code + current_off, remaining, mode, &instr);
int retval = decode(code + current_off, remaining, mode, 0x1234000,
&instr);
if (retval < 0)
goto fail;
current_off += retval;