diff options
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 9c798cb..7ef50da 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -218,8 +218,8 @@ static Status EnsureFDFlags(int fd, int flags) { static llvm::Error AddPtraceScopeNote(llvm::Error original_error) { Expected<int> ptrace_scope = GetPtraceScope(); if (auto E = ptrace_scope.takeError()) { - Log *log = GetLog(POSIXLog::Process); - LLDB_LOG(log, "error reading value of ptrace_scope: {0}", E); + LLDB_LOG_ERROR(GetLog(POSIXLog::Process), std::move(E), + "error reading value of ptrace_scope: {0}"); // The original error is probably more interesting than not being able to // read or interpret ptrace_scope. @@ -230,6 +230,7 @@ static llvm::Error AddPtraceScopeNote(llvm::Error original_error) { switch (*ptrace_scope) { case 1: case 2: + llvm::consumeError(std::move(original_error)); return llvm::createStringError( std::error_code(errno, std::generic_category()), "The current value of ptrace_scope is %d, which can cause ptrace to " @@ -239,6 +240,7 @@ static llvm::Error AddPtraceScopeNote(llvm::Error original_error) { "https://www.kernel.org/doc/Documentation/security/Yama.txt.", *ptrace_scope); case 3: + llvm::consumeError(std::move(original_error)); return llvm::createStringError( std::error_code(errno, std::generic_category()), "The current value of ptrace_scope is 3, which will cause ptrace to " |