mirror of https://github.com/x64dbg/TitanEngine
- fixed hardware breakpoints (DR7 has to be set first on x64)
- completely rewrote the hardware breakpoints engine - optimize for speed
This commit is contained in:
parent
964e15ae8c
commit
36eb6d9bc1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -152,9 +152,9 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNPACKERENGINE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<StructMemberAlignment>1Byte</StructMemberAlignment>
|
||||
|
|
@ -164,6 +164,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>Cdecl</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(ProjectDir)distorm_x86.lib;Imagehlp.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
|
@ -188,6 +189,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(ProjectDir)distorm_x64.lib;Imagehlp.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
|
|
|||
|
|
@ -131,14 +131,48 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
bool DrxEnabled;
|
||||
bool DrxExecution;
|
||||
DWORD DrxBreakPointType;
|
||||
DWORD DrxBreakPointSize;
|
||||
ULONG_PTR DrxBreakAddress;
|
||||
ULONG_PTR DrxCallBack;
|
||||
DWORD DrxBreakPointType;
|
||||
DWORD DrxBreakPointSize;
|
||||
bool DrxEnabled;
|
||||
bool DrxExecution;
|
||||
} HARDWARE_DATA, *PHARDWARE_DATA;
|
||||
|
||||
enum HWBP_MODE
|
||||
{
|
||||
MODE_DISABLED=0, //00
|
||||
MODE_LOCAL=1, //01
|
||||
MODE_GLOBAL=2 //10
|
||||
};
|
||||
|
||||
enum HWBP_TYPE
|
||||
{
|
||||
TYPE_EXECUTE=0, //00
|
||||
TYPE_WRITE=1, //01
|
||||
TYPE_READWRITE=3 //11
|
||||
};
|
||||
|
||||
enum HWBP_SIZE
|
||||
{
|
||||
SIZE_1=0, //00
|
||||
SIZE_2=1, //01
|
||||
SIZE_8=2, //10
|
||||
SIZE_4=3 //11
|
||||
};
|
||||
|
||||
struct DR7
|
||||
{
|
||||
BYTE HWBP_MODE[4];
|
||||
BYTE HWBP_TYPE[4];
|
||||
BYTE HWBP_SIZE[4];
|
||||
};
|
||||
|
||||
#define BITSET(a,x) (a|=1<<x)
|
||||
#define BITCLEAR(a,x) (a&=~(1<<x))
|
||||
#define BITTOGGLE(a,x) (a^=1<<x)
|
||||
#define BITGET(a,x) (a&(1<<x))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG_PTR chBreakPoint;
|
||||
|
|
|
|||
Loading…
Reference in New Issue