summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangUserExpression.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-03-01 00:17:06 +0000
committerJim Ingham <jingham@apple.com>2014-03-01 00:17:06 +0000
commit36a02e0655f0679c2b8b24ed6b99989c8ccd18fc (patch)
tree4b047b046ca9cb5a07f6f9770d40dd11e471d7e6 /lldb/source/Expression/ClangUserExpression.cpp
parent49f906a36fdad83a9935d6f1815d620a7d0bf57a (diff)
downloadbcm5719-llvm-36a02e0655f0679c2b8b24ed6b99989c8ccd18fc.tar.gz
bcm5719-llvm-36a02e0655f0679c2b8b24ed6b99989c8ccd18fc.zip
Make sure the exe_ctx passed to ClangUserExpression::Execute has a valid thread.
<rdar://problem/15949113> llvm-svn: 202561
Diffstat (limited to 'lldb/source/Expression/ClangUserExpression.cpp')
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 6586d10b187..524960bdf69 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -763,6 +763,12 @@ ClangUserExpression::Execute (Stream &error_stream,
// expression, it's quite convenient to have these logs come out with the STEP log as well.
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
+ if (!exe_ctx.HasThreadScope())
+ {
+ error_stream.Printf("ClangUserExpression::Execute called with no thread selected.");
+ return eExecutionSetupError;
+ }
+
if (m_jit_start_addr != LLDB_INVALID_ADDRESS || m_can_interpret)
{
lldb::addr_t struct_address = LLDB_INVALID_ADDRESS;
OpenPOWER on IntegriCloud