summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-227/+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-271-1/+1
| | | | llvm-svn: 251444
* Deprecate -m/+m dotest options in favor of test categoriesPavel Labath2015-10-271-3/+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
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-0/+2
| | | | | | | | | | | | | 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-221-4/+2
| | | | | | | | | | | | | | | | | | | | | 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-071-38/+43
| | | | | | | | | | | | | | | | 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-131-1/+1
| | | | | | | | | 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-131-4/+4
| | | | | | | | | | | | | | | 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
* Fix bug in expression display when determining if a pointer should be ↵Ilia K2015-07-301-0/+4
| | | | | | | | | | | | | | | | 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-281-23/+23
| | | | | | | | | | | | | | | 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
* Add support for Unicode strings in CMICmnLLDBUtilSBValue::GetValue (MI)Ilia K2015-05-081-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Skip additional lldb-mi tests that failed on FreeBSDEd Maste2015-05-061-0/+3
| | | | llvm-svn: 236636
* 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-251-0/+59
| | | | | | | | | | | | | | | | | | 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-251-0/+55
| | | | | | | | | | | | | | | | | | 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-251-0/+69
llvm-svn: 235804
OpenPOWER on IntegriCloud