Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ 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(log, "error reading value of ptrace_scope: {0}",
llvm::toString(std::move(E)));

// The original error is probably more interesting than not being able to
// read or interpret ptrace_scope.
Expand All @@ -230,6 +231,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 "
Expand All @@ -239,6 +241,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 "
Expand Down
Loading