1
0
Fork 0

DBG: simple logging of an instruction

This commit is contained in:
mrexodia 2016-10-28 16:09:07 +02:00
parent 164ccedf29
commit a89c65fda7
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include "value.h"
#include "symbolinfo.h"
#include "module.h"
#include "disasm_fast.h"
namespace ValueType
{
@ -14,7 +15,8 @@ namespace ValueType
Pointer,
String,
AddrInfo,
Module
Module,
Instruction
};
}
@ -75,6 +77,15 @@ static String printValue(FormatValueType value, ValueType::ValueType type)
result = mod;
}
break;
case ValueType::Instruction:
{
BASIC_INSTRUCTION_INFO info;
if(!disasmfast(valuint, &info, true))
result = "???";
else
result = info.instruction;
}
break;
default:
break;
}
@ -111,6 +122,9 @@ static const char* getArgExpressionType(const String & formatString, ValueType::
case 'm':
type = ValueType::Module;
break;
case 'i':
type = ValueType::Instruction;
break;
default: //invalid format
return nullptr;
}