diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:58 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:58 +0000 | 
| commit | f1d04915a666728c241bedb36bd99aafee3ea444 (patch) | |
| tree | d63378f567f214209764be264c47c8b0814e1665 /source/Host/posix | |
| parent | 60bb8ce74a67345b14fd540dd739254f562c605b (diff) | |
Notes
Diffstat (limited to 'source/Host/posix')
| -rw-r--r-- | source/Host/posix/ConnectionFileDescriptorPosix.cpp | 7 | ||||
| -rw-r--r-- | source/Host/posix/ProcessLauncherPosixFork.cpp | 5 | 
2 files changed, 6 insertions, 6 deletions
| diff --git a/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/source/Host/posix/ConnectionFileDescriptorPosix.cpp index 7a0c92b44918..c3b237a87302 100644 --- a/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -36,6 +36,7 @@  #include <sstream>  // Other libraries and framework includes +#include "llvm/Support/Errno.h"  #include "llvm/Support/ErrorHandling.h"  #if defined(__APPLE__)  #include "llvm/ADT/SmallVector.h" @@ -461,10 +462,8 @@ size_t ConnectionFileDescriptor::Read(void *dst, size_t dst_len,        return 0;      default: -      if (log) -        log->Printf( -            "%p ConnectionFileDescriptor::Read (), unexpected error: %s", -            static_cast<void *>(this), strerror(error_value)); +      LLDB_LOG(log, "this = {0}, unexpected error: {1}", this, +               llvm::sys::StrError(error_value));        status = eConnectionStatusError;        break; // Break to close....      } diff --git a/source/Host/posix/ProcessLauncherPosixFork.cpp b/source/Host/posix/ProcessLauncherPosixFork.cpp index 378670cd2a9a..1eace5cd24cd 100644 --- a/source/Host/posix/ProcessLauncherPosixFork.cpp +++ b/source/Host/posix/ProcessLauncherPosixFork.cpp @@ -14,6 +14,7 @@  #include "lldb/Target/ProcessLaunchInfo.h"  #include "lldb/Utility/FileSpec.h"  #include "lldb/Utility/Log.h" +#include "llvm/Support/Errno.h"  #include <limits.h>  #include <sys/ptrace.h> @@ -204,8 +205,8 @@ ProcessLauncherPosixFork::LaunchProcess(const ProcessLaunchInfo &launch_info,    ::pid_t pid = ::fork();    if (pid == -1) {      // Fork failed -    error.SetErrorStringWithFormat("Fork failed with error message: %s", -                                   strerror(errno)); +    error.SetErrorStringWithFormatv("Fork failed with error message: {0}", +                                    llvm::sys::StrError());      return HostProcess(LLDB_INVALID_PROCESS_ID);    }    if (pid == 0) { | 
