mirror of https://github.com/x64dbg/TitanEngine
- fixed a small SDK bug (with UE_MEMORY_EXECUTE)
- fixed a bug with MEMORY_EXECUTE (which was excluded as memory breakpoint type) - slightly bigger buffer, to avoid undefined output when you directly use the returned char pointer as string
This commit is contained in:
parent
592f618a9c
commit
d585941ba9
|
|
@ -10,3 +10,4 @@ Release/*/*
|
|||
*.suo
|
||||
*.bmarks
|
||||
TitanEngine/TitanEngine.cscope_file_list
|
||||
*.opensdf
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ const BYTE UE_HARDWARE = 2;
|
|||
const BYTE UE_MEMORY = 3;
|
||||
const BYTE UE_MEMORY_READ = 4;
|
||||
const BYTE UE_MEMORY_WRITE = 5;
|
||||
const BYTE UE_MEMORY_EXECUTE = 5;
|
||||
const BYTE UE_MEMORY_EXECUTE = 6;
|
||||
const DWORD UE_BREAKPOINT_TYPE_INT3 = 0x10000000;
|
||||
const DWORD UE_BREAKPOINT_TYPE_LONG_INT3 = 0x20000000;
|
||||
const DWORD UE_BREAKPOINT_TYPE_UD2 = 0x30000000;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -5005,7 +5005,7 @@ __declspec(dllexport) long long TITCALL GetPE32DataFromMappedFile(ULONG_PTR File
|
|||
PIMAGE_SECTION_HEADER PESections;
|
||||
DWORD SectionNumber = 0;
|
||||
BOOL FileIs64;
|
||||
static char sectionName[8] = "";
|
||||
static char sectionName[9] = "";
|
||||
|
||||
if(FileMapVA != NULL)
|
||||
{
|
||||
|
|
@ -5136,8 +5136,8 @@ __declspec(dllexport) long long TITCALL GetPE32DataFromMappedFile(ULONG_PTR File
|
|||
PESections = (PIMAGE_SECTION_HEADER)((ULONG_PTR)PESections + WhichSection * IMAGE_SIZEOF_SECTION_HEADER);
|
||||
if(WhichData == UE_SECTIONNAME)
|
||||
{
|
||||
memcpy(sectionName, PESections->Name, 8);
|
||||
return (long long)sectionName;
|
||||
memcpy(sectionName, PESections->Name, 8);
|
||||
return (long long)sectionName;
|
||||
}
|
||||
else if(WhichData == UE_SECTIONVIRTUALOFFSET)
|
||||
{
|
||||
|
|
@ -13538,10 +13538,11 @@ __declspec(dllexport) bool TITCALL RemoveMemoryBPX(ULONG_PTR MemoryStart, DWORD
|
|||
for(i = 0; i < BreakPointSetCount; i++)
|
||||
{
|
||||
if(BreakPointBuffer[i].BreakPointAddress == MemoryStart &&
|
||||
(BreakPointBuffer[i].BreakPointType == UE_MEMORY ||
|
||||
BreakPointBuffer[i].BreakPointType == UE_MEMORY_READ ||
|
||||
BreakPointBuffer[i].BreakPointType == UE_MEMORY_WRITE)
|
||||
)
|
||||
(BreakPointBuffer[i].BreakPointType == UE_MEMORY ||
|
||||
BreakPointBuffer[i].BreakPointType == UE_MEMORY_READ ||
|
||||
BreakPointBuffer[i].BreakPointType == UE_MEMORY_WRITE ||
|
||||
BreakPointBuffer[i].BreakPointType == UE_MEMORY_EXECUTE)
|
||||
)
|
||||
{
|
||||
if(i - 1 == BreakPointSetCount)
|
||||
{
|
||||
|
|
@ -16101,7 +16102,7 @@ __declspec(dllexport) bool TITCALL RemoveAllBreakPoints(DWORD RemoveOption)
|
|||
{
|
||||
DeleteBPX((ULONG_PTR)BreakPointBuffer[i].BreakPointAddress);
|
||||
}
|
||||
else if(BreakPointBuffer[i].BreakPointType >= UE_MEMORY && BreakPointBuffer[i].BreakPointType <= UE_MEMORY_WRITE)
|
||||
else if(BreakPointBuffer[i].BreakPointType >= UE_MEMORY && BreakPointBuffer[i].BreakPointType <= UE_MEMORY_EXECUTE)
|
||||
{
|
||||
RemoveMemoryBPX((ULONG_PTR)BreakPointBuffer[i].BreakPointAddress, BreakPointBuffer[i].BreakPointSize);
|
||||
}
|
||||
|
|
@ -16126,7 +16127,7 @@ __declspec(dllexport) bool TITCALL RemoveAllBreakPoints(DWORD RemoveOption)
|
|||
{
|
||||
DisableBPX((ULONG_PTR)BreakPointBuffer[i].BreakPointAddress);
|
||||
}
|
||||
else if(BreakPointBuffer[i].BreakPointType >= UE_MEMORY && BreakPointBuffer[i].BreakPointType <= UE_MEMORY_WRITE)
|
||||
else if(BreakPointBuffer[i].BreakPointType >= UE_MEMORY && BreakPointBuffer[i].BreakPointType <= UE_MEMORY_EXECUTE)
|
||||
{
|
||||
RemoveMemoryBPX((ULONG_PTR)BreakPointBuffer[i].BreakPointAddress, BreakPointBuffer[i].BreakPointSize);
|
||||
RtlZeroMemory(&BreakPointBuffer[i], sizeof BreakPointDetail);
|
||||
|
|
|
|||
Loading…
Reference in New Issue