Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety.

This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found.

<rdar://problem/18756927>

llvm-svn: 227935
This commit is contained in:
Greg Clayton
2015-02-03 02:05:44 +00:00
parent dcfd6ed183
commit ff48e4bea0
6 changed files with 193 additions and 145 deletions

View File

@@ -11,7 +11,7 @@
#include "lldb/Host/Mutex.h"
#include "llvm/ADT/StringMap.h"
#include <mutex>
#include <mutex> // std::once
using namespace lldb_private;