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/tools/debugserver/source/MacOSX/MachTask.mm | |
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/tools/debugserver/source/MacOSX/MachTask.mm')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachTask.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.mm b/lldb/tools/debugserver/source/MacOSX/MachTask.mm index 37897a5a6ac..bd7047ecdff 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachTask.mm +++ b/lldb/tools/debugserver/source/MacOSX/MachTask.mm @@ -88,7 +88,7 @@ kern_return_t MachTask::Suspend() { err = ::task_suspend(task); if (DNBLogCheckLogBit(LOG_TASK) || err.Fail()) err.LogThreaded("::task_suspend ( target_task = 0x%4.4x )", task); - return err.Error(); + return err.Status(); } //---------------------------------------------------------------------- @@ -113,7 +113,7 @@ kern_return_t MachTask::Resume() { err.LogThreaded("::task_resume ( target_task = 0x%4.4x )", task); } } - return err.Error(); + return err.Status(); } //---------------------------------------------------------------------- @@ -531,7 +531,7 @@ task_t MachTask::TaskPortForProcessID(pid_t pid, DNBError &err, char str[1024]; ::snprintf(str, sizeof(str), "::task_for_pid ( target_tport = 0x%4.4x, " "pid = %d, &task ) => err = 0x%8.8x (%s)", - task_self, pid, err.Error(), + task_self, pid, err.Status(), err.AsString() ? err.AsString() : "success"); if (err.Fail()) err.SetErrorString(str); @@ -583,7 +583,7 @@ kern_return_t MachTask::BasicInfo(task_t task, struct task_basic_info *info) { info->suspend_count, (uint64_t)info->virtual_size, (uint64_t)info->resident_size, user, system); } - return err.Error(); + return err.Status(); } //---------------------------------------------------------------------- @@ -687,7 +687,7 @@ kern_return_t MachTask::ShutDownExcecptionThread() { err.LogThreaded("::mach_port_deallocate ( task = 0x%4.4x, name = 0x%4.4x )", task_self, exception_port); - return err.Error(); + return err.Status(); } void *MachTask::ExceptionThread(void *arg) { @@ -805,7 +805,7 @@ void *MachTask::ExceptionThread(void *arg) { MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0); } - if (err.Error() == MACH_RCV_INTERRUPTED) { + if (err.Status() == MACH_RCV_INTERRUPTED) { // If we have no task port we should exit this thread if (!mach_task->ExceptionPortIsValid()) { DNBLogThreadedIf(LOG_EXCEPTIONS, "thread cancelled..."); @@ -824,7 +824,7 @@ void *MachTask::ExceptionThread(void *arg) { // Our task has died, exit the thread. break; } - } else if (err.Error() == MACH_RCV_TIMED_OUT) { + } else if (err.Status() == MACH_RCV_TIMED_OUT) { if (num_exceptions_received > 0) { // We were receiving all current exceptions with a timeout of zero // it is time to go back to our normal looping mode @@ -860,7 +860,7 @@ void *MachTask::ExceptionThread(void *arg) { } } #endif - } else if (err.Error() != KERN_SUCCESS) { + } else if (err.Status() != KERN_SUCCESS) { DNBLogThreadedIf(LOG_EXCEPTIONS, "got some other error, do something " "about it??? nah, continuing for " "now..."); @@ -947,7 +947,7 @@ nub_addr_t MachTask::AllocateMemory(size_t size, uint32_t permissions) { DNBError err; err = ::mach_vm_allocate(task, &addr, size, TRUE); - if (err.Error() == KERN_SUCCESS) { + if (err.Status() == KERN_SUCCESS) { // Set the protections: vm_prot_t mach_prot = VM_PROT_NONE; if (permissions & eMemoryPermissionsReadable) @@ -958,7 +958,7 @@ nub_addr_t MachTask::AllocateMemory(size_t size, uint32_t permissions) { mach_prot |= VM_PROT_EXECUTE; err = ::mach_vm_protect(task, addr, size, 0, mach_prot); - if (err.Error() == KERN_SUCCESS) { + if (err.Status() == KERN_SUCCESS) { m_allocations.insert(std::make_pair(addr, size)); return addr; } |