Made the expression parser handle persistent variables

correctly even after the process has quit.

llvm-svn: 142712
This commit is contained in:
Sean Callanan 2011-10-22 01:58:08 +00:00
parent e96f9c816b
commit a76eadd8bb
1 changed files with 4 additions and 2 deletions

View File

@ -972,9 +972,11 @@ ClangExpressionDeclMap::LookupDecl (clang::NamedDecl *decl)
{
if ((persistent_var_sp->m_flags & ClangExpressionVariable::EVIsProgramReference ||
persistent_var_sp->m_flags & ClangExpressionVariable::EVIsLLDBAllocated) &&
persistent_var_sp->m_live_sp)
persistent_var_sp->m_live_sp &&
m_parser_vars->m_exe_ctx->GetProcessSP() &&
m_parser_vars->m_exe_ctx->GetProcessSP()->IsAlive())
{
return persistent_var_sp->m_live_sp->GetValue();
return persistent_var_sp->m_live_sp->GetValue();
}
else
{