@@ -218,8 +218,8 @@ static Status EnsureFDFlags(int fd, int flags) {
218
218
static llvm::Error AddPtraceScopeNote (llvm::Error original_error) {
219
219
Expected<int > ptrace_scope = GetPtraceScope ();
220
220
if (auto E = ptrace_scope.takeError ()) {
221
- Log *log = GetLog (POSIXLog::Process);
222
- LLDB_LOG (log, " error reading value of ptrace_scope: {0}" , E );
221
+ LLDB_LOG_ERROR ( GetLog (POSIXLog::Process), std::move (E),
222
+ " error reading value of ptrace_scope: {0}" );
223
223
224
224
// The original error is probably more interesting than not being able to
225
225
// read or interpret ptrace_scope.
@@ -230,6 +230,7 @@ static llvm::Error AddPtraceScopeNote(llvm::Error original_error) {
230
230
switch (*ptrace_scope) {
231
231
case 1 :
232
232
case 2 :
233
+ llvm::consumeError (std::move (original_error));
233
234
return llvm::createStringError (
234
235
std::error_code (errno, std::generic_category ()),
235
236
" 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) {
239
240
" https://www.kernel.org/doc/Documentation/security/Yama.txt." ,
240
241
*ptrace_scope);
241
242
case 3 :
243
+ llvm::consumeError (std::move (original_error));
242
244
return llvm::createStringError (
243
245
std::error_code (errno, std::generic_category ()),
244
246
" The current value of ptrace_scope is 3, which will cause ptrace to "
0 commit comments