diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 | 
| commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
| tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/Plugins/Process/Windows/Live/DebuggerThread.cpp | |
| parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Process/Windows/Live/DebuggerThread.cpp')
| -rw-r--r-- | source/Plugins/Process/Windows/Live/DebuggerThread.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/source/Plugins/Process/Windows/Live/DebuggerThread.cpp b/source/Plugins/Process/Windows/Live/DebuggerThread.cpp index d058a412c8968..2823474cbd5ee 100644 --- a/source/Plugins/Process/Windows/Live/DebuggerThread.cpp +++ b/source/Plugins/Process/Windows/Live/DebuggerThread.cpp @@ -27,6 +27,7 @@  #include "Plugins/Process/Windows/Common/ProcessWindowsLog.h"  #include "llvm/ADT/STLExtras.h" +#include "llvm/Support/ConvertUTF.h"  #include "llvm/Support/raw_ostream.h"  using namespace lldb; @@ -378,7 +379,7 @@ DebuggerThread::HandleExceptionEvent(const EXCEPTION_DEBUG_INFO &info, DWORD thr          {              WINLOG_IFANY(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_PROCESS,                              "Breakpoint exception is cue to detach from process 0x%x", -                            m_pid_to_detach); +                            m_pid_to_detach.load());              ::DebugActiveProcessStop(m_pid_to_detach);              m_detached = true;          } @@ -484,13 +485,15 @@ DebuggerThread::HandleLoadDllEvent(const LOAD_DLL_DEBUG_INFO &info, DWORD thread          return DBG_CONTINUE;      } -    std::vector<char> buffer(1); -    DWORD required_size = GetFinalPathNameByHandle(info.hFile, &buffer[0], 0, VOLUME_NAME_DOS); +    std::vector<wchar_t> buffer(1); +    DWORD required_size = GetFinalPathNameByHandleW(info.hFile, &buffer[0], 0, VOLUME_NAME_DOS);      if (required_size > 0)      {          buffer.resize(required_size + 1); -        required_size = GetFinalPathNameByHandle(info.hFile, &buffer[0], required_size + 1, VOLUME_NAME_DOS); -        llvm::StringRef path_str(&buffer[0]); +        required_size = GetFinalPathNameByHandleW(info.hFile, &buffer[0], required_size, VOLUME_NAME_DOS); +        std::string path_str_utf8; +        llvm::convertWideToUTF8(buffer.data(), path_str_utf8); +        llvm::StringRef path_str = path_str_utf8;          const char *path = path_str.data();          if (path_str.startswith("\\\\?\\"))              path += 4;  | 
