Fixed the expression parser to handle cases where
authorSean Callanan <scallanan@apple.com>
Fri, 17 Oct 2014 18:16:04 +0000 (18:16 +0000)
committerSean Callanan <scallanan@apple.com>
Fri, 17 Oct 2014 18:16:04 +0000 (18:16 +0000)
GetValueForVariableExpressionPath returns NULL and
doesn't set an error.

<rdar://problem/18682916>

llvm-svn: 220070

lldb/source/Expression/ClangUserExpression.cpp
lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py

index a15d1a6..5de6862 100644 (file)
@@ -627,7 +627,7 @@ GetObjectPointer (lldb::StackFrameSP frame_sp,
                                                             var_sp,
                                                             err);
 
-    if (!err.Success())
+    if (!err.Success() || !valobj_sp.get())
         return LLDB_INVALID_ADDRESS;
 
     lldb::addr_t ret = valobj_sp->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
index 96f08a7..dfb6431 100644 (file)
@@ -15,7 +15,6 @@ class TestObjCIvarsInBlocks(TestBase):
     @expectedFailurei386
     @python_api_test
     @dsym_test
-    @unittest2.skip("rdar://18682916")
     def test_with_dsym_and_python_api(self):
         """Test printing the ivars of the self when captured in blocks"""
         self.buildDsym()
@@ -26,7 +25,6 @@ class TestObjCIvarsInBlocks(TestBase):
     # This test requires the 2.0 runtime, so it will fail on i386.
     @expectedFailurei386
     @dwarf_test
-    @unittest2.skip("rdar://18682916")
     def test_with_dwarf_and_python_api(self):
         """Test printing the ivars of the self when captured in blocks"""
         self.buildDwarf()