diff options
-rw-r--r-- | lldb/test/tools/lldb-mi/variable/TestMiVar.py | 92 | ||||
-rw-r--r-- | lldb/test/tools/lldb-mi/variable/main.cpp | 11 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmdCmdVar.cpp | 135 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmdCmdVar.h | 15 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmnResources.cpp | 1 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmnResources.h | 1 |
6 files changed, 186 insertions, 69 deletions
diff --git a/lldb/test/tools/lldb-mi/variable/TestMiVar.py b/lldb/test/tools/lldb-mi/variable/TestMiVar.py index 54d8077a341..286457c4937 100644 --- a/lldb/test/tools/lldb-mi/variable/TestMiVar.py +++ b/lldb/test/tools/lldb-mi/variable/TestMiVar.py @@ -46,7 +46,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-var-show-attributes var2") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var2") - self.expect("\^done,numchild=\"0\"") + self.expect("\^done,numchild=\"0\",has_more=\"0\"") self.runCmd("-data-evaluate-expression \"g_MyVar=30\"") self.expect("\^done,value=\"30\"") self.runCmd("-var-update --all-values var2") @@ -66,7 +66,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-var-show-attributes var3") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var3") - self.expect("\^done,numchild=\"0\"") + self.expect("\^done,numchild=\"0\",has_more=\"0\"") self.runCmd("-data-evaluate-expression \"s_MyVar=3\"") self.expect("\^done,value=\"3\"") self.runCmd("-var-update --all-values var3") @@ -86,7 +86,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-var-show-attributes var4") self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children var4") - self.expect("\^done,numchild=\"0\"") + self.expect("\^done,numchild=\"0\",has_more=\"0\"") self.runCmd("-data-evaluate-expression \"b=2\"") self.expect("\^done,value=\"2\"") self.runCmd("-var-update --all-values var4") @@ -106,7 +106,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): 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\"") + self.expect("\^done,numchild=\"0\",has_more=\"0\"") # Print argument "argv[0]" self.runCmd("-data-evaluate-expression \"argv[0]\"") @@ -119,7 +119,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): self.expect("\^done,status=\"editable\"") self.runCmd("-var-list-children --all-values var6") # FIXME: The name below is not correct. It should be "var.*argv[0]". - self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var6\.\*\$[0-9]+\",exp=\"\*\$[0-9]+\",numchild=\"0\",type=\"const char\",thread-id=\"4294967295\",value=\"47 '/'\",has_more=\"0\"\}\]") #FIXME -var-list-children shows invalid thread-id + self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var6\.\*\$[0-9]+\",exp=\"\*\$[0-9]+\",numchild=\"0\",type=\"const char\",thread-id=\"4294967295\",value=\"47 '/'\",has_more=\"0\"\}\],has_more=\"0\"") #FIXME -var-list-children shows invalid thread-id @lldbmi_test @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") @@ -226,5 +226,87 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-data-list-register-values d 0") self.expect("\^done,register-values=\[{number=\"0\",value=\"6\"") + @lldbmi_test + @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") + @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfLinux # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots + def test_lldbmi_var_list_children(self): + """Test that 'lldb-mi --interpreter' works for -var-list-children.""" + + self.spawnLldbMi(args = None) + + # Load executable + self.runCmd("-file-exec-and-symbols %s" % self.myexe) + self.expect("\^done") + + # Run to BP_var_list_children + line = line_number('main.cpp', '// BP_var_list_children') + self.runCmd("-break-insert main.cpp:%d" % line) + self.expect("\^done,bkpt={number=\"1\"") + self.runCmd("-exec-run") + self.expect("\^running") + self.expect("\*stopped,reason=\"breakpoint-hit\"") + + # Create variable + self.runCmd("-var-create var_complx * complx") + self.expect("\^done,name=\"var_complx\",numchild=\"3\",value=\"\{\.\.\.\}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"") + self.runCmd("-var-create var_complx_array * complx_array") + self.expect("\^done,name=\"var_complx_array\",numchild=\"2\",value=\"\[2\]\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"") + + # Test that -var-list-children lists empty children if range is empty + # FIXME (and that print-values is optional) + self.runCmd("-var-list-children 0 var_complx 0 0") + self.expect("\^done,numchild=\"0\",has_more=\"1\"") + self.runCmd("-var-list-children 0 var_complx 99 0") + self.expect("\^done,numchild=\"0\",has_more=\"1\"") + self.runCmd("-var-list-children 0 var_complx 99 3") + self.expect("\^done,numchild=\"0\",has_more=\"0\"") + + # Test that -var-list-children lists all children with their values + # (and that from and to are optional) + self.runCmd("-var-list-children --all-values var_complx") + self.expect("\^done,numchild=\"3\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",value=\"3\",has_more=\"0\"\},child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\},child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",value=\"0x[0-9a-f]+\",has_more=\"0\"\}\],has_more=\"0\"") + self.runCmd("-var-list-children --simple-values var_complx_array") + self.expect("\^done,numchild=\"2\",children=\[child=\{name=\"var_complx_array\.\[0\]\",exp=\"\[0\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\},child=\{name=\"var_complx_array\.\[1\]\",exp=\"\[1\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"") + + # Test that -var-list-children lists children without values + self.runCmd("-var-list-children 0 var_complx 0 1") + self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"") + # FIXME: first 0 is treated as --no-values + self.runCmd("-var-list-children --no-values var_complx 0 1") + # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"") + + # Test that -var-list-children lists children with all values + self.runCmd("-var-list-children 1 var_complx 1 2") + self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"") + # FIXME: first 1 is treated as --all-values + self.runCmd("-var-list-children --all-values var_complx 1 2") + # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"") + + # Test that -var-list-children lists children with simple values + self.runCmd("-var-list-children 2 var_complx 2 4") + self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"") + # FIXME: first 2 is treated as --simple-values + self.runCmd("-var-list-children --simple-values var_complx 2 4") + # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"") + + # Test that an invalid from is handled + # FIXME: first 0 is treated as --no-values + # FIXME: -1 is treated as unsigned int + self.runCmd("-var-list-children 0 var_complx -1 0") + #self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"") + + # Test that an invalid to is handled + # FIXME: first 0 is treated as --no-values + # FIXME: -1 is treated as unsigned int + self.runCmd("-var-list-children 0 var_complx 0 -1") + #self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"") + + # Test that a missing low-frame or high-frame is handled + # FIXME: first 0 is treated as --no-values + # FIXME: -1 is treated as unsigned int + self.runCmd("-var-list-children 0 var_complx 0") + self.expect("\^error,msg=\"Command 'var-list-children'. Variable children range invalid\"") + if __name__ == '__main__': unittest2.main() diff --git a/lldb/test/tools/lldb-mi/variable/main.cpp b/lldb/test/tools/lldb-mi/variable/main.cpp index 6b5809b3427..1bb0aee1de4 100644 --- a/lldb/test/tools/lldb-mi/variable/main.cpp +++ b/lldb/test/tools/lldb-mi/variable/main.cpp @@ -35,6 +35,16 @@ var_update_test(void) } void +var_list_children(void) +{ + complex_type complx = { 3, { 3L }, &complx }; + complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } }; + + // BP_var_list_children +} + + +void gdb_set_show_print_char_array_as_string_test(void) { const char *string_ptr = "string - const char *"; @@ -70,6 +80,7 @@ main(int argc, char const *argv[]) int a = 10, b = 20; s_MyVar = a + b; var_update_test(); + var_list_children(); gdb_set_show_print_char_array_as_string_test(); gdb_set_show_print_expand_aggregates(); gdb_set_show_print_aggregate_field_names(); diff --git a/lldb/tools/lldb-mi/MICmdCmdVar.cpp b/lldb/tools/lldb-mi/MICmdCmdVar.cpp index 83071fbde26..1b35174c9e0 100644 --- a/lldb/tools/lldb-mi/MICmdCmdVar.cpp +++ b/lldb/tools/lldb-mi/MICmdCmdVar.cpp @@ -935,13 +935,17 @@ CMICmdCmdVarSetFormat::CreateSelf(void) // Throws: None. //-- CMICmdCmdVarListChildren::CMICmdCmdVarListChildren(void) - : m_bValueValid(false) - , m_nChildren(0) - , m_constStrArgPrintValues("print-values") - , m_constStrArgName("name") + : m_constStrArgPrintValues("print-values") , m_constStrArgNoValues("no-values") , m_constStrArgAllValues("all-values") , m_constStrArgSimpleValues("simple-values") + , m_constStrArgName("name") + , m_constStrArgFrom("from") + , m_constStrArgTo("to") + , m_bValueValid(false) + , m_nChildren(0) + , m_miValueList(true) + , m_bHasMore(false) { // Command factory matches this name with that received from the stdin stream m_strMiCmd = "var-list-children"; @@ -959,7 +963,6 @@ CMICmdCmdVarListChildren::CMICmdCmdVarListChildren(void) //-- CMICmdCmdVarListChildren::~CMICmdCmdVarListChildren(void) { - m_vecMiValueResult.clear(); } //++ ------------------------------------------------------------------------------------ @@ -979,6 +982,8 @@ CMICmdCmdVarListChildren::ParseArgs(void) bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true))); bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true))); bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true))); + bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrom, false, true))); + bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgTo, false, true))); return (bOk && ParseValidateCmdOptions()); } @@ -994,25 +999,34 @@ CMICmdCmdVarListChildren::ParseArgs(void) bool CMICmdCmdVarListChildren::Execute(void) { + CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues); + CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues); + CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues); + CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues); CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName); - CMICMDBASE_GETOPTION(pArgPrintValue, Number, m_constStrArgPrintValues); - CMICMDBASE_GETOPTION(pArgNoValue, OptionLong, m_constStrArgNoValues); - CMICMDBASE_GETOPTION(pArgAllValue, OptionLong, m_constStrArgAllValues); - CMICMDBASE_GETOPTION(pArgSimpleValue, OptionLong, m_constStrArgSimpleValues); + CMICMDBASE_GETOPTION(pArgFrom, Number, m_constStrArgFrom); + CMICMDBASE_GETOPTION(pArgTo, Number, m_constStrArgTo); - MIuint print_value = 0; - if (pArgPrintValue->GetFound()) + CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat; + if (pArgPrintValues->GetFound()) { - MIuint tmp = pArgPrintValue->GetValue(); - if (tmp <= 2) - print_value = tmp; + const MIuint nPrintValues = pArgPrintValues->GetValue(); + if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats) + { + SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str())); + return MIstatus::failure; + } + eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues); } - else if (pArgNoValue->GetFound()) - print_value = 0; // no value - else if (pArgAllValue->GetFound()) - print_value = 1; // all values - else if (pArgSimpleValue->GetFound()) - print_value = 2; // simple values + else if (pArgNoValues->GetFound()) + eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues; + else if (pArgAllValues->GetFound()) + eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues; + else if (pArgSimpleValues->GetFound()) + eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues; + else + // If no print-values, default is "no-values" + eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues; const CMIUtilString &rVarObjName(pArgName->GetValue()); CMICmnLLDBDebugSessionInfoVarObj varObj; @@ -1022,18 +1036,32 @@ CMICmdCmdVarListChildren::Execute(void) return MIstatus::failure; } + MIuint nFrom = 0; + MIuint nTo = UINT32_MAX; + if (pArgFrom->GetFound() && pArgTo->GetFound()) + { + nFrom = pArgFrom->GetValue(); + nTo = pArgTo->GetValue(); + } + else if (pArgFrom->GetFound() || pArgTo->GetFound()) + { + // Only from or to was specified but both are required + SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID), m_cmdData.strMiCmd.c_str())); + return MIstatus::failure; + } + lldb::SBValue &rValue = const_cast<lldb::SBValue &>(varObj.GetValue()); m_bValueValid = rValue.IsValid(); if (!m_bValueValid) return MIstatus::success; - m_vecMiValueResult.clear(); - m_nChildren = rValue.GetNumChildren(); - for (MIuint i = 0; i < m_nChildren; i++) + const MIuint nChildren = rValue.GetNumChildren(); + m_bHasMore = nTo < nChildren; + nTo = std::min(nTo, nChildren); + m_nChildren = nFrom < nTo ? nTo - nFrom : 0; + for (MIuint i = nFrom; i < nTo; i++) { lldb::SBValue member = rValue.GetChildAtIndex(i); - if (!member.IsValid()) - continue; const CMICmnLLDBUtilSBValue utilValue(member); const CMIUtilString strExp = utilValue.GetName(); const CMIUtilString name(CMIUtilString::Format("%s.%s", rVarObjName.c_str(), strExp.c_str())); @@ -1046,19 +1074,20 @@ CMICmdCmdVarListChildren::Execute(void) CMICmnMIValueTuple miValueTuple(miValueResult); const CMICmnMIValueConst miValueConst2(strExp); const CMICmnMIValueResult miValueResult2("exp", miValueConst2); - miValueTuple.Add(miValueResult2); - const CMIUtilString strNumChild(CMIUtilString::Format("%d", nChildren)); + bool bOk = miValueTuple.Add(miValueResult2); + const CMIUtilString strNumChild(CMIUtilString::Format("%u", nChildren)); const CMICmnMIValueConst miValueConst3(strNumChild); const CMICmnMIValueResult miValueResult3("numchild", miValueConst3); - miValueTuple.Add(miValueResult3); + bOk = bOk && miValueTuple.Add(miValueResult3); const CMICmnMIValueConst miValueConst5(utilValue.GetTypeNameDisplay()); const CMICmnMIValueResult miValueResult5("type", miValueConst5); - miValueTuple.Add(miValueResult5); + bOk = bOk && miValueTuple.Add(miValueResult5); const CMICmnMIValueConst miValueConst6(strThreadId); const CMICmnMIValueResult miValueResult6("thread-id", miValueConst6); - miValueTuple.Add(miValueResult6); + bOk = bOk && miValueTuple.Add(miValueResult6); // nChildren == 0 is used to check for simple values - if ( (print_value == 2 && nChildren == 0) || (print_value == 1) ) + if (eVarInfoFormat == CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues || + (eVarInfoFormat == CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues && nChildren == 0)) { // Varobj gets added to CMICmnLLDBDebugSessionInfoVarObj static container of varObjs CMICmnLLDBDebugSessionInfoVarObj var(strExp, name, member, rVarObjName); @@ -1066,14 +1095,15 @@ CMICmdCmdVarListChildren::Execute(void) CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(member, CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Natural)); const CMICmnMIValueConst miValueConst7(strValue); const CMICmnMIValueResult miValueResult7("value", miValueConst7); - miValueTuple.Add(miValueResult7); + bOk = bOk && miValueTuple.Add(miValueResult7); } const CMICmnMIValueConst miValueConst8("0"); const CMICmnMIValueResult miValueResult8("has_more", miValueConst8); - miValueTuple.Add(miValueResult8); + bOk = bOk && miValueTuple.Add(miValueResult8); const CMICmnMIValueResult miValueResult9("child", miValueTuple); - m_vecMiValueResult.push_back(miValueResult9); - + bOk = bOk && m_miValueList.Add(miValueResult9); + if (!bOk) + return MIstatus::failure; } return MIstatus::success; @@ -1093,36 +1123,29 @@ CMICmdCmdVarListChildren::Acknowledge(void) { if (m_bValueValid) { - // MI print "%s^done,numchild=\"%u\",children=[]"" + // MI print "%s^done,numchild=\"%u\",children=[%s],has_more=\"%d\"" const CMIUtilString strNumChild(CMIUtilString::Format("%u", m_nChildren)); const CMICmnMIValueConst miValueConst(strNumChild); CMICmnMIValueResult miValueResult("numchild", miValueConst); - - VecMIValueResult_t::const_iterator it = m_vecMiValueResult.begin(); - if (it != m_vecMiValueResult.end()) - { - CMICmnMIValueList miValueList(*it); - ++it; - while (it != m_vecMiValueResult.end()) - { - const CMICmnMIValueResult &rResult(*it); - miValueList.Add(rResult); - - // Next - ++it; - } - miValueResult.Add("children", miValueList); - } + bool bOk = MIstatus::success; + if (m_nChildren != 0) + bOk = bOk && miValueResult.Add("children", m_miValueList); + const CMIUtilString strHasMore(m_bHasMore ? "1" : "0"); + const CMICmnMIValueConst miValueConst2(strHasMore); + bOk = bOk && miValueResult.Add("has_more", miValueConst2); + if (!bOk) + return MIstatus::failure; const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done, miValueResult); m_miResultRecord = miRecordResult; + return MIstatus::success; } - // MI print "%s^done,numchild=\"0\"" - const CMICmnMIValueConst miValueConst("0"); - const CMICmnMIValueResult miValueResult("numchild", miValueConst); - const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done, miValueResult); + // MI print "%s^error,msg=\"variable invalid\"" + const CMICmnMIValueConst miValueConst("variable invalid"); + const CMICmnMIValueResult miValueResult("msg", miValueConst); + const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult); m_miResultRecord = miRecordResult; return MIstatus::success; diff --git a/lldb/tools/lldb-mi/MICmdCmdVar.h b/lldb/tools/lldb-mi/MICmdCmdVar.h index a47ec014499..88d72ec7db8 100644 --- a/lldb/tools/lldb-mi/MICmdCmdVar.h +++ b/lldb/tools/lldb-mi/MICmdCmdVar.h @@ -263,20 +263,19 @@ class CMICmdCmdVarListChildren : public CMICmdBase // From CMICmnBase /* dtor */ virtual ~CMICmdCmdVarListChildren(void); - // Typedefs: - private: - typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t; - // Attributes: private: - bool m_bValueValid; // True = yes SBValue object is valid, false = not valid - VecMIValueResult_t m_vecMiValueResult; - MIuint m_nChildren; const CMIUtilString m_constStrArgPrintValues; - const CMIUtilString m_constStrArgName; const CMIUtilString m_constStrArgNoValues; const CMIUtilString m_constStrArgAllValues; const CMIUtilString m_constStrArgSimpleValues; + const CMIUtilString m_constStrArgName; + const CMIUtilString m_constStrArgFrom; + const CMIUtilString m_constStrArgTo; + bool m_bValueValid; // True = yes SBValue object is valid, false = not valid + MIuint m_nChildren; + CMICmnMIValueList m_miValueList; + bool m_bHasMore; }; //++ ============================================================================ diff --git a/lldb/tools/lldb-mi/MICmnResources.cpp b/lldb/tools/lldb-mi/MICmnResources.cpp index 6991e741036..44a7d1f7ec9 100644 --- a/lldb/tools/lldb-mi/MICmnResources.cpp +++ b/lldb/tools/lldb-mi/MICmnResources.cpp @@ -227,6 +227,7 @@ const CMICmnResources::SRsrcTextData CMICmnResources::ms_pResourceId2TextData[] {IDS_CMD_ERR_VARIABLE_ENUM_INVALID, "Command '%s'. Invalid enumeration for variable '%s' formatted string '%s'"}, {IDS_CMD_ERR_VARIABLE_EXPRESSIONPATH, "Command '%s'. Failed to get expression for variable '%s'"}, {IDS_CMD_ERR_VARIABLE_CREATION_FAILED, "Failed to create variable object for '%s'"}, + {IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID, "Command '%s'. Variable children range invalid"}, {IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION, "<Error: Command run but command did not do anything useful. No MI response formed>"}, {IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION, "<Error: Command run and event caught, did nothing useful. No MI Out-of-Bound formed>"}, {IDS_CMD_ERR_DISASM_ADDR_START_INVALID, "Command '%s'. Invalid start value '%s'"}, diff --git a/lldb/tools/lldb-mi/MICmnResources.h b/lldb/tools/lldb-mi/MICmnResources.h index 37e607c85b7..4e2a20574c6 100644 --- a/lldb/tools/lldb-mi/MICmnResources.h +++ b/lldb/tools/lldb-mi/MICmnResources.h @@ -245,6 +245,7 @@ enum IDS_CMD_ERR_VARIABLE_ENUM_INVALID, IDS_CMD_ERR_VARIABLE_EXPRESSIONPATH, IDS_CMD_ERR_VARIABLE_CREATION_FAILED, + IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID, IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION, IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION, IDS_CMD_ERR_DISASM_ADDR_START_INVALID, |