mirror of https://github.com/x64dbg/zydis
fixed build with clang
This commit is contained in:
parent
86b88d2e6b
commit
30b60c7dc4
|
@ -187,7 +187,7 @@ uint8_t VXBaseDataSource_InputPeek(VXBaseDataSourceContext *ctx, VXInstructionIn
|
||||||
return thiz->currentInput;
|
return thiz->currentInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t VXBaseDataSource_InputNext8(VXBaseDataSourceContext *ctx, VXInstructionInfo *info)
|
uint8_t VXBaseDataSource_InputNext8(VXBaseDataSourceContext *ctx, VXInstructionInfo *info)
|
||||||
{
|
{
|
||||||
VXBaseDataSource *thiz = VXBaseDataSource_thiz(ctx);
|
VXBaseDataSource *thiz = VXBaseDataSource_thiz(ctx);
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ static uint8_t VXBaseDataSource_InputNext8(VXBaseDataSourceContext *ctx, VXInstr
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VXBASEDATASOURCE_INPUTNEXT_N(n) \
|
#define VXBASEDATASOURCE_INPUTNEXT_N(n) \
|
||||||
static uint##n##_t VXBaseDataSource_InputNext##n( \
|
uint##n##_t VXBaseDataSource_InputNext##n( \
|
||||||
VXBaseDataSourceContext *ctx, VXInstructionInfo *info) \
|
VXBaseDataSourceContext *ctx, VXInstructionInfo *info) \
|
||||||
{ \
|
{ \
|
||||||
uint##n##_t result = 0; \
|
uint##n##_t result = 0; \
|
||||||
|
@ -274,8 +274,6 @@ void VXMemoryDataSource_Construct(
|
||||||
|
|
||||||
void VXMemoryDataSource_Destruct(VXBaseDataSourceContext *ctx)
|
void VXMemoryDataSource_Destruct(VXBaseDataSourceContext *ctx)
|
||||||
{
|
{
|
||||||
VXMemoryDataSource *thiz = VXMemoryDataSource_thiz(ctx);
|
|
||||||
|
|
||||||
// Nothing to destruct ourselfes, just call parent destructor
|
// Nothing to destruct ourselfes, just call parent destructor
|
||||||
VXBaseDataSource_Destruct(ctx);
|
VXBaseDataSource_Destruct(ctx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef struct _VXBaseInstructionFormatter
|
||||||
static void VXBaseInstructionFormatter_Construct(VXBaseInstructionFormatterContext *ctx, VXBaseSymbolResolverContext *symbolResolver);
|
static void VXBaseInstructionFormatter_Construct(VXBaseInstructionFormatterContext *ctx, VXBaseSymbolResolverContext *symbolResolver);
|
||||||
static void VXBaseInstructionFormatter_Destruct(VXBaseInstructionFormatterContext *ctx);
|
static void VXBaseInstructionFormatter_Destruct(VXBaseInstructionFormatterContext *ctx);
|
||||||
void VXBaseInstructionFormatter_Release(VXBaseInstructionFormatterContext *ctx);
|
void VXBaseInstructionFormatter_Release(VXBaseInstructionFormatterContext *ctx);
|
||||||
static void VXBaseInstructionFormatter_OutputSetUppercase(VXBaseInstructionFormatterContext *ctx, bool uppercase);
|
/*static void VXBaseInstructionFormatter_OutputSetUppercase(VXBaseInstructionFormatterContext *ctx, bool uppercase);*/
|
||||||
static char const* VXBaseInstructionFormatter_RegisterToString(const VXBaseInstructionFormatterContext *ctx, VXRegister reg);
|
static char const* VXBaseInstructionFormatter_RegisterToString(const VXBaseInstructionFormatterContext *ctx, VXRegister reg);
|
||||||
static char const* VXBaseInstructionFormatter_ResolveSymbol(const VXBaseInstructionFormatterContext *ctx, const VXInstructionInfo *info, uint64_t address, uint64_t *offset);
|
static char const* VXBaseInstructionFormatter_ResolveSymbol(const VXBaseInstructionFormatterContext *ctx, const VXInstructionInfo *info, uint64_t address, uint64_t *offset);
|
||||||
VXBaseSymbolResolverContext* VXBaseInstructionFormatter_GetSymbolResolver(const VXBaseInstructionFormatterContext *ctx);
|
VXBaseSymbolResolverContext* VXBaseInstructionFormatter_GetSymbolResolver(const VXBaseInstructionFormatterContext *ctx);
|
||||||
|
@ -203,6 +203,8 @@ VXBaseSymbolResolverContext* VXCustomSymbolResolver_Create(
|
||||||
ctx->d.type = TYPE_CUSTOMSYMBOLRESOLVER;
|
ctx->d.type = TYPE_CUSTOMSYMBOLRESOLVER;
|
||||||
ctx->d.ptr = thiz;
|
ctx->d.ptr = thiz;
|
||||||
|
|
||||||
|
VXCustomSymbolResolver_Construct(ctx, resolverCb, userData);
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,11 +315,13 @@ void VXBaseInstructionFormatter_Release(
|
||||||
free(ctx);
|
free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static void VXBaseInstructionFormatter_OutputSetUppercase(VXBaseInstructionFormatterContext *ctx,
|
static void VXBaseInstructionFormatter_OutputSetUppercase(VXBaseInstructionFormatterContext *ctx,
|
||||||
bool uppercase)
|
bool uppercase)
|
||||||
{
|
{
|
||||||
VXBaseInstructionFormatter_thiz(ctx)->outputUppercase = uppercase;
|
VXBaseInstructionFormatter_thiz(ctx)->outputUppercase = uppercase;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static char const* VXBaseInstructionFormatter_RegisterToString(
|
static char const* VXBaseInstructionFormatter_RegisterToString(
|
||||||
const VXBaseInstructionFormatterContext *ctx, VXRegister reg)
|
const VXBaseInstructionFormatterContext *ctx, VXRegister reg)
|
||||||
|
@ -530,8 +534,6 @@ static void VXBaseInstructionFormatter_OutputAppendImmediate(
|
||||||
const VXOperandInfo *operand,
|
const VXOperandInfo *operand,
|
||||||
bool resolveSymbols)
|
bool resolveSymbols)
|
||||||
{
|
{
|
||||||
VXBaseInstructionFormatter *thiz = VXBaseInstructionFormatter_thiz(ctx);
|
|
||||||
|
|
||||||
assert(operand->type == OPTYPE_IMMEDIATE);
|
assert(operand->type == OPTYPE_IMMEDIATE);
|
||||||
uint64_t value = 0;
|
uint64_t value = 0;
|
||||||
if (operand->signed_lval && (operand->size != info->operand_mode))
|
if (operand->signed_lval && (operand->size != info->operand_mode))
|
||||||
|
@ -600,8 +602,6 @@ static void VXBaseInstructionFormatter_OutputAppendDisplacement(
|
||||||
VXBaseInstructionFormatterContext *ctx, const VXInstructionInfo *info,
|
VXBaseInstructionFormatterContext *ctx, const VXInstructionInfo *info,
|
||||||
const VXOperandInfo *operand)
|
const VXOperandInfo *operand)
|
||||||
{
|
{
|
||||||
VXBaseInstructionFormatter *thiz = VXBaseInstructionFormatter_thiz(ctx);
|
|
||||||
|
|
||||||
assert(operand->offset > 0);
|
assert(operand->offset > 0);
|
||||||
if ((operand->base == REG_NONE) && (operand->index == REG_NONE))
|
if ((operand->base == REG_NONE) && (operand->index == REG_NONE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define VX_INLINE __inline
|
# define VX_INLINE __inline
|
||||||
#else
|
#else
|
||||||
# define VX_INLINE inline
|
# define VX_INLINE extern inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VX_EXPORT
|
#define VX_EXPORT
|
||||||
|
|
Loading…
Reference in New Issue