[Lldb-commits] [lldb] r121099 - /lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Jim Ingham
jingham at apple.com
Mon Dec 6 17:56:02 PST 2010
Author: jingham
Date: Mon Dec 6 19:56:02 2010
New Revision: 121099
URL: http://llvm.org/viewvc/llvm-project?rev=121099&view=rev
Log:
Handle the case where you make a ClangExpressionDeclMap without a selected frame.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=121099&r1=121098&r2=121099&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Mon Dec 6 19:56:02 2010
@@ -37,6 +37,7 @@
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
#include "llvm/Support/raw_ostream.h"
using namespace lldb;
@@ -65,7 +66,9 @@
if (exe_ctx.frame)
m_parser_vars->m_sym_ctx = exe_ctx.frame->GetSymbolContext(lldb::eSymbolContextEverything);
-
+ else if (exe_ctx.thread)
+ m_parser_vars->m_sym_ctx = exe_ctx.thread->GetStackFrameAtIndex(0)->GetSymbolContext(lldb::eSymbolContextEverything);
+
if (exe_ctx.process)
m_parser_vars->m_persistent_vars = &exe_ctx.process->GetPersistentVariables();
}
@@ -313,7 +316,9 @@
assert (m_parser_vars.get());
// Back out in all cases where we're not fully initialized
- if (m_parser_vars->m_exe_ctx->frame == NULL)
+ if (m_parser_vars->m_exe_ctx->target == NULL)
+ return false;
+ if (!m_parser_vars->m_sym_ctx.target_sp)
return false;
SymbolContextList sc_list;
More information about the lldb-commits
mailing list