mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-11-27 06:40:24 +00:00
DBG: move NtTerminateProcess event from a bp to exit process callback
This commit is contained in:
parent
6ab2ba2c40
commit
0c81a126ca
@ -1489,9 +1489,23 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo)
|
||||
static void cbExitProcess(EXIT_PROCESS_DEBUG_INFO* ExitProcess)
|
||||
{
|
||||
dprintf(QT_TRANSLATE_NOOP("DBG", "Process stopped with exit code 0x%X\n"), ExitProcess->dwExitCode);
|
||||
const bool breakHere = settingboolget("Events", "NtTerminateProcess");
|
||||
if(breakHere)
|
||||
{
|
||||
// lock
|
||||
DebugUpdateGuiSetStateAsync(GetContextDataEx(hActiveThread, UE_CIP), true);
|
||||
lock(WAITID_RUN);
|
||||
}
|
||||
// plugin callback
|
||||
PLUG_CB_EXITPROCESS callbackInfo;
|
||||
callbackInfo.ExitProcess = ExitProcess;
|
||||
plugincbcall(CB_EXITPROCESS, &callbackInfo);
|
||||
if(breakHere)
|
||||
{
|
||||
dbgsetforeground();
|
||||
dbgsetskipexceptions(false);
|
||||
wait(WAITID_RUN);
|
||||
}
|
||||
_dbg_animatestop(); // Stop animating
|
||||
//history
|
||||
dbgcleartracestate();
|
||||
@ -1756,8 +1770,6 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
|
||||
cookie.HandleNtdllLoad(bIsAttached);
|
||||
if(settingboolget("Misc", "TransparentExceptionStepping"))
|
||||
exceptionDispatchAddr = DbgValFromString("ntdll:KiUserExceptionDispatcher");
|
||||
if(settingboolget("Events", "NtTerminateProcess")) // Break on NtTerminateProcess
|
||||
cmddirectexec("bp ntdll.NtTerminateProcess, ss");
|
||||
//set debug flags
|
||||
if(dwDebugFlags != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user