mirror of https://github.com/x64dbg/GleeBug
Execute the attach breakpoint after the create process breakpoint
This commit is contained in:
parent
7790cc9e12
commit
3c02faea83
|
|
@ -9,7 +9,7 @@ namespace GleeBug
|
|||
auto foundInfo = mProcess->breakpoints.find({ BreakpointType::Software, ptr(exceptionRecord.ExceptionAddress) });
|
||||
if(foundInfo == mProcess->breakpoints.end())
|
||||
{
|
||||
if(!mProcess->systemBreakpoint) //handle system breakpoint
|
||||
if(!this->mAttachedToProcess && !mProcess->systemBreakpoint) //handle system breakpoint
|
||||
{
|
||||
//set internal state
|
||||
mProcess->systemBreakpoint = true;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ namespace GleeBug
|
|||
void Debugger::createProcessEvent(const CREATE_PROCESS_DEBUG_INFO & createProcess)
|
||||
{
|
||||
//initial attach housekeeping
|
||||
bool attachBreakpoint = false;
|
||||
if(mAttachedToProcess && !mMainProcess.dwProcessId)
|
||||
{
|
||||
mMainProcess.hProcess = createProcess.hProcess;
|
||||
mMainProcess.hThread = createProcess.hThread;
|
||||
mMainProcess.dwProcessId = mDebugEvent.dwProcessId;
|
||||
mMainProcess.dwThreadId = mDebugEvent.dwThreadId;
|
||||
cbAttachBreakpoint();
|
||||
attachBreakpoint = true;
|
||||
}
|
||||
|
||||
//process housekeeping
|
||||
|
|
@ -36,6 +37,10 @@ namespace GleeBug
|
|||
//close the file handle
|
||||
if(createProcess.hFile)
|
||||
CloseHandle(createProcess.hFile);
|
||||
|
||||
//call attach breakpoint after process creation
|
||||
if (attachBreakpoint)
|
||||
cbAttachBreakpoint();
|
||||
}
|
||||
|
||||
void Debugger::exitProcessEvent(const EXIT_PROCESS_DEBUG_INFO & exitProcess)
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ public:
|
|||
);
|
||||
|
||||
if (offset == INVALID_VALUE)
|
||||
return 0
|
||||
return 0;
|
||||
else
|
||||
return ReturnType ? FileMapVA + offset : offset;
|
||||
}
|
||||
|
|
@ -586,7 +586,7 @@ public:
|
|||
);
|
||||
|
||||
if (offset == INVALID_VALUE)
|
||||
return 0
|
||||
return 0;
|
||||
else
|
||||
return ReturnType ? FileMapVA + offset : offset;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ public:
|
|||
);
|
||||
|
||||
if (offset == INVALID_VALUE)
|
||||
return 0
|
||||
return 0;
|
||||
else
|
||||
return ReturnType ? FileMapVA + offset : offset;
|
||||
}
|
||||
|
|
@ -650,7 +650,7 @@ public:
|
|||
);
|
||||
|
||||
if (offset == INVALID_VALUE)
|
||||
return 0
|
||||
return 0;
|
||||
else
|
||||
return ReturnType ? FileMapVA + offset : offset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue