From 556658c79e34ce1fe126e2634d47b80e8b3e78fd Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 16 Oct 2010 18:11:41 +0000 Subject: [PATCH] Fixed an issue with MachTask::TaskResume () where if the task was already suspended, we would call "int ::task_resume (task_t task);" as many times as it took to resume the task which isn't what we want to do. llvm-svn: 116674 --- lldb/tools/debugserver/source/MacOSX/MachTask.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp index 61ace434ec53..62ebac294b68 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp @@ -86,14 +86,18 @@ MachTask::Resume() { struct task_basic_info task_info; task_t task = TaskPort(); + if (task == TASK_NULL) + return KERN_INVALID_ARGUMENT; DNBError err; err = BasicInfo(task, &task_info); if (err.Success()) { - integer_t i; - for (i=0; i 0) { err = ::task_resume (task); if (DNBLogCheckLogBit(LOG_TASK) || err.Fail())