summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-mi/variable
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-284-778/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-272-2/+2
| | | | llvm-svn: 251444
* Deprecate -m/+m dotest options in favor of test categoriesPavel Labath2015-10-272-9/+0
| | | | | | | | | | | | | | | | | | | Summary: This change deprecates -m/+m dotest options (the options are still recognized but they print an error message pointing to the new options) and adds a new lldb-mi test category instead. To just run lldb-mi tests, use '-G lldb-mi'. To skip lldb-mi tests, use '--skip-category lldb-mi'. All lldb-mi tests are marked as such using the getCategories method on the base MiTestCaseBase class and the @lldbmi_test decorator is not needed. In case one still needs to annotate a specific test function as an lldb-mi test, one can use the @add_test_categories(['lldb-mi']) decorator to achieve that. Reviewers: tfiala, dawn, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14060 llvm-svn: 251400
* [lldb-mi] Fix expansion of anonymous structures and unionsDawn Perchik2015-10-242-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of type: struct S { union { int i1; unsigned u1; }; union { int i2; unsigned u2; }; }; had been impossible to evaluate in lldb-mi, because MI assigns '??' as the variable name to each of the unnamed unions after "-var-list-children" command. Also '??' incorrectly goes to 'exp' field which is treated by IDE as a structure field name and is displayed in watch window. The patch fixes this returning empty string as type name for unnamed union and assigning $N to variable name, where N is the field number in the parent entity. Patch from evgeny.leviant@gmail.com Reviewed by: clayborg, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13947 llvm-svn: 251176
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-232-0/+4
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-222-8/+4
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* [lldb-mi] Fix evaluation of strings containing characters from non-ascii rangeDawn Perchik2015-10-073-38/+82
| | | | | | | | | | | | | | | | If a string contained characters outside the ASCII range, lldb-mi would print them as hexadecimal codes. This patch fixes this behaviour by converting to UTF-8 instead, by having lldb-mi use registered type summary providers, when they are available. This patch also fixes incorrect evaluation of some composite types, like std::string, by having them use a type registered type summary provider. Based on patch from evgeny.leviant@gmail.com Reviewed by: ki.stfu, granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13058 llvm-svn: 249597
* Remove Unicode byte-order mark from python files.Zachary Turner2015-08-132-2/+2
| | | | | | | | | This was caused by a bug in the PTVS source file editor, which has since been fixed and awaiting a new release. For now people using this editor need to remember to manually remove this before committing a file. llvm-svn: 244963
* Disable lldb-mi tests on Windows.Zachary Turner2015-08-132-9/+9
| | | | | | | | | | | | | | | Most were already XFAIL'ed, but the reason for the XFAIL is that we don't have a suitable pexpect implementation on Windows. This isn't going to change unintentionally, so there is no reason to XFAIL them as opposed to just skip them. llvm.org/pr22274 tracks finding a suitable pexpect module for Windows, which should fix many of these issues. llvm.org/pr24452 tracks the larger issue of making the entire lldb-mi test suite work on Windows, of which finding a pexpect module is just one component. llvm-svn: 244951
* [lldb-mi] Fix evaluation for children of created variable object.Dawn Perchik2015-07-311-0/+11
| | | | | | | | | | | | | | Move code in CMICmdCmdVarListChildren::Execute() up so that the child object will always be added when the MI command -var-list-children is entered (instead of only when the print-value was all or simple). This patch fixes evaluation of expressions like varobj.member for a created varobj with children. Reviewed by: abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11659 llvm-svn: 243782
* Escape new line and tabs in the result of variable evaluation.Hafiz Abid Qadeer2015-07-311-1/+1
| | | | | | | | | Expression evaluation error messages may have embedded new lines and tabs. These should be escaped in the result string. Patch by paulmaybee. Reviewed in http://reviews.llvm.org/D11570. llvm-svn: 243741
* Clean up test/tools/lldb-mi/variable/main.cpp after r243619Ilia K2015-07-301-1/+1
| | | | llvm-svn: 243621
* Fix bug in expression display when determining if a pointer should be ↵Ilia K2015-07-302-0/+13
| | | | | | | | | | | | | | | | treated as a string Summary: Currently if the "first child" of the pointer is a char type then the pointer is displayed as a string. This test succeeds incorrectly when the pointer is to a structured type with a char type as its first field. Fix this by switching the test to retrieve the pointee type and checking that it is a char type. Reviewers: abidh, ChuckR, ki.stfu Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D11488 llvm-svn: 243619
* Support escapes and quotes in string and character values.Ilia K2015-07-282-29/+29
| | | | | | | | | | | | | | | Summary: Escape characters in strings and strings containing quotes were not appearing correctly in expression values. Patch from paulmay@microsoft.com Reviewers: abidh, ChuckR, paulmaybee Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D11371 llvm-svn: 243383
* Expand result with type char* to string in -data-evaluate-expressionIlia K2015-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Expand result with type char* to string in -data-evaluate-expression. was: ``` -data-evaluate-expression str ^done,value="0x00007fffffffece0" ``` now: ``` -data-evaluate-expression str ^done,value="0x00007fffffffece0 \"hello\"" ``` All tests pass on Linux. Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, dawn, abidh Differential Revision: http://reviews.llvm.org/D10728 llvm-svn: 240631
* Fix typo in previous commitPavel Labath2015-05-181-1/+1
| | | | llvm-svn: 237575
* Update TestMiVar with a bug idPavel Labath2015-05-181-1/+1
| | | | llvm-svn: 237571
* XFAIL'd MiVarTestCase.test_lldbmi_eval on gcc-4.9/i386Vince Harron2015-05-151-0/+1
| | | | | | | | It times out on TestMyVar:113 self.expect("\^done,value=\"0x[0-9a-f]+\"") llvm-svn: 237480
* Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)Ilia K2015-05-152-6/+32
| | | | llvm-svn: 237454
* Fix CMICmdArgValPrintValues::Validate & enable 4 tests that were XFAIL'ed in ↵Ilia K2015-05-151-1/+0
| | | | | | r237437 (MI) llvm-svn: 237443
* XFAIL 4 lldb-mi tests to get Linux build green back (MI)Ilia K2015-05-151-0/+1
| | | | llvm-svn: 237437
* Fix parsing of print-values arg (MI)Ilia K2015-05-151-14/+7
| | | | | | | | | # Add CMICmdArgValPrintValues argument # Rework -stack-list-arguments/-stack-list-locals/-stack-list-variables/-var-update/-var-list-children commands to use the CMICmdArgValPrintValues argument instead of usage of pair of non-mandatory arguments like: CMICmdArgValNumber(0) || CMICmdArgValLongOptions("no-values") llvm-svn: 237429
* Show error message from failed evaluation when doing -var-createIlia K2015-05-121-1/+1
| | | | | | | | | | | | | | | | | Summary: When -var-create fails, we will now show the error message from the failed evaluation if it is available. Patch from chuckr@microsoft.com Test Plan: I fixed the MiVarTestCase.test_lldbmi_eval test to expect the new error string. All MI tests passing on OS X. Reviewers: abidh, ChuckR Subscribers: greggm, lldb-commits, paulmaybee Differential Revision: http://reviews.llvm.org/D9691 llvm-svn: 237094
* Add support for Unicode strings in CMICmnLLDBUtilSBValue::GetValue (MI)Ilia K2015-05-082-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes the following changes: # Add CMIUtilString::ConvertToASCII to convert unicode to ASCII (MI) # Rework CMICmnLLDBUtilSBValue::GetSimpleValue to print wide/unicode char (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValueChar ## Extend CMICmnLLDBUtilSBValue::IsCharType to accept char16_t/char32_t ## Don't ignore the fail_value in SBValue::GetValueAsUnsigned # Rework CMIUtilString::ConvertToASCII (MI) ## Don't use templates ## Change the function signature to convert signle characters (was std::basic_string) ## Rename CMIUtilString::ConvertToASCII to CMIUtilString::ConvertToPrintableASCII # Add CMIUtilString::ConvertToPrintableASCII for char (MI) ## Refactor CMIUtilString::Escape ## Simplify CMICmnLLDBUtilSBValue::GetSimpleValueChar for char # Add char16_t* and char32_t* support in CMICmnLLDBUtilSBValue::GetSimpleValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValueCStringPointer ## Add CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 (it's extended version of CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory) # Improve error checking in CMICmnLLDBUtilSBValue::GetSimpleValueChar (MI) # Refactor CMICmnLLDBUtilSBValue (MI) ## Remove CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory (use CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 instead) ## Rename CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 to CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory ## Move CMICmnLLDBUtilSBValue::GetValueCString to private methods ## Rename CMICmnLLDBUtilSBValue::GetValueCString to CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray ## Remove CMICmnLLDBUtilSBValue::GetChildValueCString # Improve MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string test to check char16_t/char32_t (MI) # Fix CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray for Unicode (MI) ## Fix handling of char16_t and char32_t ## Improve CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory to read variables of type char[]: add vnMaxLen argument ## Turn on few cases to check char16_t[] and char32_t[] output in MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string # Remove unnecessary checks in CMICmnLLDBUtilSBValue (MI) llvm-svn: 236827
* Fix -var-create for undefined variables (MI)Ilia K2015-05-081-1/+1
| | | | llvm-svn: 236825
* Fix -var-list-children command (MI)Ilia K2015-05-082-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch incldues the following: # Add from/to arguments in -var-list-children command (MI) ## Handle from and to args ## Don't print children=[] if numchild is 0 ## A bit refactoring ## Add MiVarTestCase.test_lldbmi_var_list_children test # Refactor -var-list-children (MI) ## Remove CMICmdCmdVarListChildren::VecMIValueResult_t ## Add CMICmdCmdVarListChildren::m_miValueList ## Remove CMICmdCmdVarListChildren::m_vecMiValueResult (use CMICmdCmdVarListChildren::m_miValueList instead) ## Print error message if value is invalid: ``` ^error,msg="variable invalid" ``` ## Refactor CMICmdCmdVarListChildren::Acknowledge and remove duplicated code ## Don't print children=[] if numchild is 0 ## Add error checking ## Use CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e for print-values ## Add few more empty-range test cases in MiVarTestCase.test_lldbmi_var_list_children #Improve MiVarTestCase.test_lldbmi_var_list_children test (MI) llvm-svn: 236820
* Skip additional lldb-mi tests that failed on FreeBSDEd Maste2015-05-061-0/+3
| | | | llvm-svn: 236636
* [TestMiVar] Enable one of the tests for GCC.Siva Chandra2015-04-281-2/+2
| | | | | | | | | | | | | | | | | | Summary: The "internal" name of vars is different between clang and GCC. All this change does is to use a regex instead of the hardcoded internal name. Test Plan: dotest.py -C <clang|gcc> -p TestMiVar Reviewers: ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9128 llvm-svn: 236024
* LLDB-MI: -var-list-children with no children doesn't need a children value ↵Bruce Mitchener2015-04-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | in the response. Summary: When using GDB with MI, if there aren't children for a variable, it doesn't include a "children" value in the response. LLDB does and sets it to "[]" while variables with children have an unquoted list: children=[...]. This removes the children value entirely when there are no children making this match GDB in behavior. Test Plan: Ran tests on Mac OS X and they passed. Reviewers: abidh, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9320 llvm-svn: 235974
* XFAIL two mi tests on gcc to stabilise build botsPavel Labath2015-04-271-0/+2
| | | | llvm-svn: 235851
* Disable ↵Ilia K2015-04-251-0/+1
| | | | | | MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string test on Linux llvm-svn: 235808
* Add -gdb-set/-gdb-show aggregate-field-names option (MI)Ilia K2015-04-252-0/+69
| | | | | | | | | | | | | | | | | | Use this option to print/skip field names (default is on): ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print aggregate-field-names off ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{3,{3},0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{{4,{4},0x[0-9a-f]+},{5,{5},0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235807
* Add -gdb-set/-gdb-show expand-aggregates option (MI)Ilia K2015-04-252-0/+65
| | | | | | | | | | | | | | | | | | Use this option to expand complex types always: ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{...}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="[2]",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print expand-aggregates on ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235805
* Add -gdb-set/-gdb-show print char-array-as-string option (MI)Ilia K2015-04-252-0/+79
| | | | llvm-svn: 235804
* Fix the MiVarTestCase.test_lldbmi_var_create_register test to expect 32bit ↵Ilia K2015-04-171-1/+2
| | | | | | value on 32bit systems llvm-svn: 235204
* Fix the MiVarTestCase.test_lldbmi_var_create_register test on 32bit systemsIlia K2015-04-171-1/+4
| | | | llvm-svn: 235197
* MI support for '-var-create $regname' command.Ilia K2015-04-171-0/+36
| | | | | | | | | | | | | | | | | | Summary: This command is currently processed using expression evaluation, meaning the variable binds to the result of the expression not the register. Therefore any subsequent calls to '-var-assign' will not update the register. Fixed by detecting '$' prefix for registers according to specification. Thanks, Ewan Patch from ewan@codeplay.com Reviewers: EwanCrawford Subscribers: lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D8965 llvm-svn: 235195
* Use lazy regex in lldb-mi testsIlia K2015-04-171-2/+2
| | | | | | This patch also fixes the timing issue in MiBreakTestCase.test_lldbmi_break_insert_function test. llvm-svn: 235189
* Skip TestMiVar test case to get build greenPavel Labath2015-04-151-0/+1
| | | | | | bug report at <https://llvm.org/bugs/show_bug.cgi?id=23239>. llvm-svn: 235002
* Refactor ↵Ilia K2015-04-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI) Summary: This patch includes the following changes: # Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI) Also it expands the variable value format for strings (aka char*): was: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0" ``` now: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0" ``` # Expand the variable value format for arrays (according to GDB) For example: was: ``` ^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0" ``` now: ``` ^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0" ``` # Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI) # Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI) # Refactor CMICmnLLDBUtilSBValue ## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType ## Refactor CMICmnLLDBUtilSBValue::GetValue ## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs ## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType ## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[] # Minor changes in CMICmnLLDBUtilSBValue::GetValue # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2 ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo ## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace # Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2 ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth # Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one # Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3 ## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2 ## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added) # Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added) # Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBUtilSBValue::GetValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValue ## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue # Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0. ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat ## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead) # Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI) ## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types ## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code ## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false) ## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue ## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo ## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets: was: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }} ``` now: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}} ``` ## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue) # Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI) ## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo ## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue ## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead) ## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values was: ``` {name="p",value="0x0000000000000000 """} ``` now: ``` {name="p",value="0x0000000000000000 \"\""} ``` # Refactor CMICmnLLDBUtilSBValue ## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates ## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]") # Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI) For example: was: ``` ^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` now: ``` ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` # Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI) Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8913 llvm-svn: 234476
* Enabling the lldb-mi tests on Linux.Hafiz Abid Qadeer2015-03-161-1/+0
| | | | | | | | | I think the issue that caused the random failure has been fixed. So I am enabling the tests again on Linux. There are still some tests that are skipped on Linux due to different output. Those will be handled separately. Tested with dotest.py and with "make check-lldb" and there was no MI related failure. llvm-svn: 232380
* Add lldb-mi/lldb-server test folders to PATH before in dotest.pyIlia K2015-03-121-4/+0
| | | | | | | | | | | | | | | | | Summary: This patch allows not specify search path in each lldb-mi test. It makes tests easier. This fix was requested by vharron. All test pass on OS X. Reviewers: vharron, clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D8207 llvm-svn: 232019
* Skip all lldb-mi tests on LinuxVince Harron2015-03-081-0/+2
| | | | | | | lldb-mi tests have been failing for a while on the buildbots. Disabling until someone has a chance to fix. llvm-svn: 231602
* Fix -var-create and -var-update (MI)Ilia K2015-03-062-0/+92
| | | | | | | | | | | | | | | | | | | | | Summary: This patch includes: * Fix -var-create command for global/static variables * Fix -var-update command: remove m_strValueName/m_eVarInfoFormat/m_bValueChanged{Array,Composite,Normal}Type; clean CMICmdCmdVarUpdate::Execute and CMICmdCmdVarUpdate::Acknowledge; improve CMICmdCmdVarUpdate::MIFormResponse; Complete the value after -var-create using the CMICmdCmdVarCreate::CompleteSBValue to get SBValue::GetValueDidChange work. * Add non-constant version of CMICmnLLDBDebugSessionInfoVarObj::GetValue * Add MiVarTestCase.test_lldbmi_var_update test All tests pass on OS X. Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8110 llvm-svn: 231525
* Fix ImportError in lldb-mi tests on LinuxIlia K2015-02-251-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the following error: ``` File "/home/llvmbb/llvm-build-dir/lldb-x86_64-clang-ubuntu-14.04/llvm/tools/lldb/test/tools/lldb-mi/signal/TestMiSignal.py", line 5, in <module> import lldbmi_testcase ImportError: No module named lldbmi_testcase ``` Reviewers: vharron, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, vharron, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7857 llvm-svn: 230466
* Refactor lldb-mi testsIlia K2015-02-203-0/+148
Summary: This patch includes following changes: * split lldb-mi tests into separate folders. It will make our life simpler because we can modify a test program of certain test and don't worry about other tests * a bit refactoring * fix comments * improve some tests Reviewers: emaste, clayborg, abidh Reviewed By: clayborg, abidh Subscribers: clayborg, lldb-commits, emaste, abidh Differential Revision: http://reviews.llvm.org/D7762 llvm-svn: 230022
OpenPOWER on IntegriCloud