diff options
author | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
commit | 97206d572797bddc1bba71bb1c18c97f19d69053 (patch) | |
tree | fdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp | |
parent | 3086b45a2fae833e8419885e78c598d936cc6429 (diff) | |
download | bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed
on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without
find and replace, but that has potential to catch unwanted
occurrences of common strings such as "Error". Every effort
was made to find all the obvious things such as the word "Error"
appearing in a string, etc, but it's possible there are still
some lingering occurences left around. Hopefully nothing too
serious.
llvm-svn: 302872
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp b/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp index 4e979bd4553..f0059f15cc1 100644 --- a/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp +++ b/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp @@ -20,7 +20,7 @@ #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #include "lldb/Host/linux/Ptrace.h" -#include "lldb/Utility/Error.h" +#include "lldb/Utility/Status.h" using namespace lldb; using namespace lldb_private; @@ -77,7 +77,7 @@ bool WorkaroundNeeded() { if (sched_getaffinity(child_pid, sizeof available_cpus, &available_cpus) == -1) { LLDB_LOG(log, "failed to get available cpus: {0}", - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); return false; } @@ -85,7 +85,7 @@ bool WorkaroundNeeded() { ::pid_t wpid = waitpid(child_pid, &status, __WALL); if (wpid != child_pid || !WIFSTOPPED(status)) { LLDB_LOG(log, "waitpid() failed (status = {0:x}): {1}", status, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); return false; } @@ -99,12 +99,12 @@ bool WorkaroundNeeded() { CPU_SET(cpu, &cpus); if (sched_setaffinity(child_pid, sizeof cpus, &cpus) == -1) { LLDB_LOG(log, "failed to switch to cpu {0}: {1}", cpu, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); continue; } int status; - Error error = + Status error = NativeProcessLinux::PtraceWrapper(PTRACE_SINGLESTEP, child_pid); if (error.Fail()) { LLDB_LOG(log, "single step failed: {0}", error); @@ -114,7 +114,7 @@ bool WorkaroundNeeded() { wpid = waitpid(child_pid, &status, __WALL); if (wpid != child_pid || !WIFSTOPPED(status)) { LLDB_LOG(log, "waitpid() failed (status = {0:x}): {1}", status, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); break; } if (WSTOPSIG(status) != SIGTRAP) { @@ -152,7 +152,7 @@ std::unique_ptr<SingleStepWorkaround> SingleStepWorkaround::Get(::pid_t tid) { if (sched_getaffinity(tid, sizeof original_set, &original_set) != 0) { // This should really not fail. But, just in case... LLDB_LOG(log, "Unable to get cpu affinity for thread {0}: {1}", tid, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); return nullptr; } @@ -164,7 +164,7 @@ std::unique_ptr<SingleStepWorkaround> SingleStepWorkaround::Get(::pid_t tid) { // to run on cpu 0. If that happens, only thing we can do is it log it and // continue... LLDB_LOG(log, "Unable to set cpu affinity for thread {0}: {1}", tid, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); } LLDB_LOG(log, "workaround for thread {0} prepared", tid); @@ -176,7 +176,7 @@ SingleStepWorkaround::~SingleStepWorkaround() { LLDB_LOG(log, "Removing workaround"); if (sched_setaffinity(m_tid, sizeof m_original_set, &m_original_set) != 0) { LLDB_LOG(log, "Unable to reset cpu affinity for thread {0}: {1}", m_tid, - Error(errno, eErrorTypePOSIX)); + Status(errno, eErrorTypePOSIX)); } } #endif |