Fix -var-create for undefined variables (MI)

llvm-svn: 236825
This commit is contained in:
Ilia K 2015-05-08 10:58:45 +00:00
parent a4cfe98a86
commit 24862eaca0
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase):
# Print non-existant variable
self.runCmd("-var-create var1 * undef")
#self.expect("\^error") #FIXME: shows undef as {...}
self.expect("\^error,msg=\"Failed to create variable object for 'undef'\"")
self.runCmd("-data-evaluate-expression undef")
self.expect("\^error,msg=\"Could not evaluate expression\"")

View File

@ -197,7 +197,7 @@ CMICmdCmdVarCreate::Execute(void)
if (!value.IsValid())
value = frame.EvaluateExpression(rStrExpression.c_str());
if (value.IsValid())
if (value.IsValid() && value.GetError().Success())
{
CompleteSBValue(value);
m_bValid = true;