Permalink
Browse files

DBG+GUI: updated register context structures (for plugin mingw compat…

…ibility)
  • Loading branch information...
mrexodia committed Dec 30, 2014
1 parent ab0279e commit ab3cf76115837db8ddfe30a670df17769e92b6be
@@ -423,6 +423,18 @@ typedef struct
} X87CONTROLWORDFIELDS;
typedef struct DECLSPEC_ALIGN(16) _XMMREGISTER
{
ULONGLONG Low;
LONGLONG High;
} XMMREGISTER;
typedef struct
{
XMMREGISTER Low; //XMM/SSE part
XMMREGISTER High; //AVX part
} YMMREGISTER;
typedef struct
{
BYTE data[10];
@@ -480,11 +492,11 @@ typedef struct
X87FPU x87fpu;
DWORD MxCsr;
#ifdef _WIN64
M128A XmmRegisters[16];
BYTE YmmRegisters[32 * 16];
XMMREGISTER XmmRegisters[16];
YMMREGISTER YmmRegisters[16];
#else // x86
M128A XmmRegisters[8];
BYTE YmmRegisters[32 * 8];
XMMREGISTER XmmRegisters[8];
YMMREGISTER YmmRegisters[8];
#endif
} REGISTERCONTEXT;
@@ -10,14 +10,6 @@
#include <windows.h>
#include <stdint.h>
#ifdef __GNUC__
typedef struct DECLSPEC_ALIGN(16) _M128A
{
ULONGLONG Low;
LONGLONG High;
} M128A, *PM128A;
#endif //__GNUC__
#pragma pack(push, 1)
// Global.Constant.Structure.Declaration:
@@ -594,10 +586,16 @@ typedef struct
DWORD OriginalCOMTableSize;
} FILE_FIX_INFO, *PFILE_FIX_INFO;
typedef struct DECLSPEC_ALIGN(16) _XmmRegister_t
{
ULONGLONG Low;
LONGLONG High;
} XmmRegister_t;
typedef struct
{
M128A Low; //XMM/SSE part
M128A High; //AVX part
XmmRegister_t Low; //XMM/SSE part
XmmRegister_t High; //AVX part
} YmmRegister_t;
typedef struct
@@ -657,10 +655,10 @@ typedef struct
x87FPU_t x87fpu;
DWORD MxCsr;
#ifdef _WIN64
M128A XmmRegisters[16];
XmmRegister_t XmmRegisters[16];
YmmRegister_t YmmRegisters[16];
#else // x86
M128A XmmRegisters[8];
XmmRegister_t XmmRegisters[8];
YmmRegister_t YmmRegisters[8];
#endif
} TITAN_ENGINE_CONTEXT_t;
View
@@ -234,6 +234,8 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
{
if(!EngineCheckStructAlignment(UE_STRUCT_TITAN_ENGINE_CONTEXT, sizeof(TITAN_ENGINE_CONTEXT_t)))
return "Invalid TITAN_ENGINE_CONTEXT_t alignment!";
if(sizeof(TITAN_ENGINE_CONTEXT_t) != sizeof(REGISTERCONTEXT))
return "Invalid REGISTERCONTEXT alignment!";
dbginit();
dbgfunctionsinit();
json_set_alloc_funcs(emalloc_json, efree_json);
@@ -2375,22 +2375,22 @@ char* RegistersView::registerValue(const REGDUMP* regd, const REGISTER_NAME reg)
if(reg == XMM14) return (char*) & (regd->regcontext.XmmRegisters[14]);
if(reg == XMM15) return (char*) & (regd->regcontext.XmmRegisters[15]);
if(reg == YMM0) return (char*) & (regd->regcontext.YmmRegisters[32 * 0]);
if(reg == YMM1) return (char*) & (regd->regcontext.YmmRegisters[32 * 1]);
if(reg == YMM2) return (char*) & (regd->regcontext.YmmRegisters[32 * 2]);
if(reg == YMM3) return (char*) & (regd->regcontext.YmmRegisters[32 * 3]);
if(reg == YMM4) return (char*) & (regd->regcontext.YmmRegisters[32 * 4]);
if(reg == YMM5) return (char*) & (regd->regcontext.YmmRegisters[32 * 5]);
if(reg == YMM6) return (char*) & (regd->regcontext.YmmRegisters[32 * 6]);
if(reg == YMM7) return (char*) & (regd->regcontext.YmmRegisters[32 * 7]);
if(reg == YMM8) return (char*) & (regd->regcontext.YmmRegisters[32 * 8]);
if(reg == YMM9) return (char*) & (regd->regcontext.YmmRegisters[32 * 9]);
if(reg == YMM10) return (char*) & (regd->regcontext.YmmRegisters[32 * 10]);
if(reg == YMM11) return (char*) & (regd->regcontext.YmmRegisters[32 * 11]);
if(reg == YMM12) return (char*) & (regd->regcontext.YmmRegisters[32 * 12]);
if(reg == YMM13) return (char*) & (regd->regcontext.YmmRegisters[32 * 13]);
if(reg == YMM14) return (char*) & (regd->regcontext.YmmRegisters[32 * 14]);
if(reg == YMM15) return (char*) & (regd->regcontext.YmmRegisters[32 * 15]);
if(reg == YMM0) return (char*) & (regd->regcontext.YmmRegisters[0]);
if(reg == YMM1) return (char*) & (regd->regcontext.YmmRegisters[1]);
if(reg == YMM2) return (char*) & (regd->regcontext.YmmRegisters[2]);
if(reg == YMM3) return (char*) & (regd->regcontext.YmmRegisters[3]);
if(reg == YMM4) return (char*) & (regd->regcontext.YmmRegisters[4]);
if(reg == YMM5) return (char*) & (regd->regcontext.YmmRegisters[5]);
if(reg == YMM6) return (char*) & (regd->regcontext.YmmRegisters[6]);
if(reg == YMM7) return (char*) & (regd->regcontext.YmmRegisters[7]);
if(reg == YMM8) return (char*) & (regd->regcontext.YmmRegisters[8]);
if(reg == YMM9) return (char*) & (regd->regcontext.YmmRegisters[9]);
if(reg == YMM10) return (char*) & (regd->regcontext.YmmRegisters[10]);
if(reg == YMM11) return (char*) & (regd->regcontext.YmmRegisters[11]);
if(reg == YMM12) return (char*) & (regd->regcontext.YmmRegisters[12]);
if(reg == YMM13) return (char*) & (regd->regcontext.YmmRegisters[13]);
if(reg == YMM14) return (char*) & (regd->regcontext.YmmRegisters[14]);
if(reg == YMM15) return (char*) & (regd->regcontext.YmmRegisters[15]);
return (char*) & null_value;
}

0 comments on commit ab3cf76

Please sign in to comment.