diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 14:49:36 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 14:49:36 +0100 |
| commit | 1b9d1dc6093028ceb0f2eeeccf9cfbc5610fcf30 (patch) | |
| tree | a63aca8dd2f11ea86ef7dfe066c3942e8b5e2dfe /src/include | |
| parent | a6143f33ce443c16a773816c2255936a39aee129 (diff) | |
| download | box64-1b9d1dc6093028ceb0f2eeeccf9cfbc5610fcf30.tar.gz box64-1b9d1dc6093028ceb0f2eeeccf9cfbc5610fcf30.zip | |
Added Zydis lib support for Trace enabled build
Diffstat (limited to 'src/include')
| -rwxr-xr-x | src/include/box64context.h | 6 | ||||
| -rwxr-xr-x | src/include/x64trace.h | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h index fe99e899..e6b4be63 100755 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -7,6 +7,8 @@ typedef struct elfheader_s elfheader_t; typedef struct cleanup_s cleanup_t; typedef struct x64emu_s x64emu_t; +typedef struct zydis_s zydis_t; +typedef struct zydis_dec_s zydis_dec_t; typedef void* (*procaddess_t)(const char* name); typedef void* (*vkprocaddess_t)(void* instance, const char* name); @@ -31,7 +33,7 @@ typedef struct box64context_s { uint32_t sel_serial; // will be increment each time selectors changes - //zydis_t *zydis; // dlopen the zydis dissasembler + zydis_t *zydis; // dlopen the zydis dissasembler void* box64lib; // dlopen on box86 itself int argc; @@ -65,7 +67,7 @@ typedef struct box64context_s { int clean_sz; int clean_cap; - //zydis_dec_t *dec; // trace + zydis_dec_t *dec; // trace uint8_t canary[4]; diff --git a/src/include/x64trace.h b/src/include/x64trace.h new file mode 100755 index 00000000..662f2740 --- /dev/null +++ b/src/include/x64trace.h @@ -0,0 +1,17 @@ +#ifndef __X64TRACE_H_ +#define __X64TRACE_H_ +#include <stdint.h> + +typedef struct box64context_s box64context_t; +typedef struct zydis_dec_s zydis_dec_t; + +int InitX64Trace(box64context_t *context); +void DeleteX64Trace(box64context_t *context); + +zydis_dec_t* InitX64TraceDecoder(box64context_t *context); +void DeleteX64TraceDecoder(zydis_dec_t **dec); +const char* DecodeX64Trace(zydis_dec_t *dec, uintptr_t p); + +#define ZYDIS_RUNTIME_ADDRESS_NONE (uint64_t)(-1) + +#endif //__X64TRACE_H_ \ No newline at end of file |