From 1640a25f6833bd72b902c049144bcceb14c9716e Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 26 Aug 2014 12:18:17 +0000 Subject: [PATCH] ide: Developing debugger termination, Core/SMTP: Fixed issue with lone space at the end of text git-svn-id: svn://ultimatepp.org/upp/trunk@7608 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/SMTP/Smtp.cpp | 1 + uppsrc/ide/Debuggers/Pdb.cpp | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/uppsrc/Core/SMTP/Smtp.cpp b/uppsrc/Core/SMTP/Smtp.cpp index f313ea028..4a6836a1c 100644 --- a/uppsrc/Core/SMTP/Smtp.cpp +++ b/uppsrc/Core/SMTP/Smtp.cpp @@ -282,6 +282,7 @@ String Smtp::GetMessage(bool chunks) msg.Cat('='); msg.Cat(hex[(*p >> 4) & 15]); msg.Cat(hex[*p & 15]); + begin = false; } if(!begin) diff --git a/uppsrc/ide/Debuggers/Pdb.cpp b/uppsrc/ide/Debuggers/Pdb.cpp index 5c96f2226..74ccf7a8a 100644 --- a/uppsrc/ide/Debuggers/Pdb.cpp +++ b/uppsrc/ide/Debuggers/Pdb.cpp @@ -337,17 +337,22 @@ Pdb::~Pdb() WorkspaceConfigData("pdb-debugger") = ss; if(hProcess != INVALID_HANDLE_VALUE) { if(!running) - ContinueDebugEvent(event.dwProcessId, event.dwThreadId, DBG_CONTINUE); - TerminateProcess(hProcess, -1); + ContinueDebugEvent(event.dwProcessId, event.dwThreadId, DBG_TERMINATE_PROCESS); + TerminateProcess(hProcess, 0); +/* // TerminateProcess should take care of everything... -/* do { - if(!WaitForDebugEvent(&event, 1500)) + do { + if(!WaitForDebugEvent(&event, 1500) || + !ContinueDebugEvent(event.dwProcessId, event.dwThreadId, DBG_CONTINUE) + TerminateProcess(hProcess, -1); break; - if(!ContinueDebugEvent(event.dwProcessId, event.dwThreadId, DBG_CONTINUE)) + } + if() break; } while(event.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT); -*/ CleanupOnExit(); +*/ + CleanupOnExit(); } StoreToGlobal(*this, CONFIGNAME); IdeRemoveBottom(*this);