diff options
author | Pavel Labath <labath@google.com> | 2017-06-06 14:06:17 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-06-06 14:06:17 +0000 |
commit | 10c41f37b5ae69ddaec7a81f5141cf00090bae22 (patch) | |
tree | 740dfdd2d7833262d11b08071bf76423e5bf5c3c /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | |
parent | 9f9422b69956beea6ff029b637d349e693f668b5 (diff) | |
download | bcm5719-llvm-10c41f37b5ae69ddaec7a81f5141cf00090bae22.tar.gz bcm5719-llvm-10c41f37b5ae69ddaec7a81f5141cf00090bae22.zip |
replace uses of strerror with llvm::sys::StrError
strerror is not thread-safe. llvm's StrError tries hard to retrieve the
string in a thread-safe way and falls back to strerror only if it does
not have another way.
llvm-svn: 304795
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 15e7c9b5f69..a130472c72d 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -43,14 +43,14 @@ #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StringExtractor.h" +#include "llvm/Support/Errno.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Threading.h" #include "NativeThreadLinux.h" #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #include "Procfs.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/Threading.h" - #include <linux/unistd.h> #include <sys/socket.h> #include <sys/syscall.h> @@ -97,7 +97,7 @@ static bool ProcessVmReadvSupported() { LLDB_LOG(log, "syscall process_vm_readv failed (error: {0}). Fast memory " "reads disabled.", - strerror(errno)); + llvm::sys::StrError()); }); return is_supported; @@ -1988,7 +1988,7 @@ Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size, LLDB_LOG(log, "using process_vm_readv to read {0} bytes from inferior " "address {1:x}: {2}", - size, addr, success ? "Success" : strerror(errno)); + size, addr, success ? "Success" : llvm::sys::StrError(errno)); if (success) return Status(); |