From 725945d5680a38cd284de1a4e6780ced489590c4 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Fri, 3 Sep 2010 22:35:47 +0000 Subject: Fixed an lldb infrastructure bug, where the debugger should reaaly update its execution context only when the process is still alive. When running the test suite, the debugger is launching and killing processes constantly. This might be the cause of the test hang as reported in rdar://problem/8377854, where the debugger was looping infinitely trying to update a supposedly stale thread list. llvm-svn: 113022 --- lldb/source/Core/Debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Core/Debugger.cpp') diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index ee33ec53f49..1cdd7ad4d87 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -479,7 +479,7 @@ Debugger::UpdateExecutionContext (ExecutionContext *override_context) { m_exe_ctx.target = target_sp.get(); m_exe_ctx.process = target_sp->GetProcessSP().get(); - if (m_exe_ctx.process && m_exe_ctx.process->IsRunning() == false) + if (m_exe_ctx.process && m_exe_ctx.process->IsAlive() && !m_exe_ctx.process->IsRunning()) { m_exe_ctx.thread = m_exe_ctx.process->GetThreadList().GetSelectedThread().get(); if (m_exe_ctx.thread == NULL) -- cgit v1.2.3