Fixed tools

This commit is contained in:
Joel Höner 2017-01-21 18:15:37 +01:00
parent 03e26408fe
commit 87e80346f4
3 changed files with 4 additions and 4 deletions

View File

@ -501,6 +501,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx,
// TODO: MMX registers
// TODO: rBP
// TODO: RIP relative addressing
// TODO: Segment prefixes
// Memory operand?
if (operand->type == ZYDIS_OPERAND_TYPE_MEMORY)
@ -628,6 +629,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx,
if (reg == -1) return ZYDIS_STATUS_INVALID_PARAMETER;
// TODO: Conditional assignment instead?
ctx->info->details.vex.vvvv = (reg & 0x0F);
ctx->info->details.xop.vvvv = (reg & 0x0F);
ctx->info->details.evex.vvvv = (reg & 0x0F);
break;
}

View File

@ -77,12 +77,11 @@ int main(int argc, char** argv)
ZydisStatus status;
size_t readOffs = 0;
while ((status = ZydisDecoderDecodeInstruction(
&decoder, readBuf + readOffs, numBytesRead - readOffs, &info
&decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info
)) != ZYDIS_STATUS_NO_MORE_DATA)
{
if (!ZYDIS_SUCCESS(status))
{
++decoder.instructionPointer;
++readOffs;
printf("db %02X\n", info.data[0]);
continue;

View File

@ -87,12 +87,11 @@ int main()
ZydisStatus status;
size_t readOffs = 0;
while ((status = ZydisDecoderDecodeInstruction(
&decoder, readBuf + readOffs, numBytesRead - readOffs, &info
&decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info
)) != ZYDIS_STATUS_NO_MORE_DATA)
{
if (!ZYDIS_SUCCESS(status))
{
++decoder.instructionPointer;
++readOffs;
continue;
}