Index: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py =================================================================== --- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py +++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py @@ -47,7 +47,7 @@ self.runCmd("-var-show-attributes var2") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var2") - self.expect("\^done,numchild=\"0\",children=\"\[\]\"") + self.expect("\^done,numchild=\"0\"") self.runCmd("-data-evaluate-expression \"g_MyVar=30\"") self.expect("\^done,value=\"30\"") self.runCmd("-var-update --all-values var2") @@ -67,7 +67,7 @@ self.runCmd("-var-show-attributes var3") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var3") - self.expect("\^done,numchild=\"0\",children=\"\[\]\"") + self.expect("\^done,numchild=\"0\"") self.runCmd("-data-evaluate-expression \"s_MyVar=3\"") self.expect("\^done,value=\"3\"") self.runCmd("-var-update --all-values var3") @@ -87,7 +87,7 @@ self.runCmd("-var-show-attributes var4") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var4") - self.expect("\^done,numchild=\"0\",children=\"\[\]\"") + self.expect("\^done,numchild=\"0\"") self.runCmd("-data-evaluate-expression \"b=2\"") self.expect("\^done,value=\"2\"") self.runCmd("-var-update --all-values var4") @@ -107,7 +107,7 @@ self.runCmd("-var-show-attributes var5") self.expect("\^done,status=\"editable\"") #FIXME editable or not? self.runCmd("-var-list-children var5") - self.expect("\^done,numchild=\"0\",children=\"\[\]\"") + self.expect("\^done,numchild=\"0\"") # Print argument "argv[0]" self.runCmd("-data-evaluate-expression \"argv[0]\"") Index: lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp +++ lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp @@ -1099,12 +1099,7 @@ CMICmnMIValueResult miValueResult("numchild", miValueConst); VecMIValueResult_t::const_iterator it = m_vecMiValueResult.begin(); - if (it == m_vecMiValueResult.end()) - { - const CMICmnMIValueConst miValueConst("[]"); - miValueResult.Add("children", miValueConst); - } - else + if (it != m_vecMiValueResult.end()) { CMICmnMIValueList miValueList(*it); ++it;