summaryrefslogtreecommitdiffstats
path: root/lldb/test/expression_command
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new option to the test driver, -N dsym or -N dwarf, in order to ↵Johnny Chen2012-04-063-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exclude tests decorated with either @dsym_test or @dwarf_test to be executed during the testsuite run. There are still lots of Test*.py files which have not been decorated with the new decorator. An example: # From TestMyFirstWatchpoint.py -> class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") @dsym_test def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDwarf(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() # Invocation -> [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-137 Path: /Volumes/data/lldb/svn/ToT URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 154133 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154109 Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49' Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests' 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.138s OK (skipped=1) Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49' [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ llvm-svn: 154154
* Fix method name for output.Eric Christopher2012-03-251-1/+1
| | | | llvm-svn: 153416
* Convert all python objects in our API to use overload the __str__ methodGreg Clayton2012-02-041-1/+1
| | | | | | | | | | | | | | | | instead of the __repr__. __repr__ is a function that should return an expression that can be used to recreate an python object and we were using it to just return a human readable string. Fixed a crasher when using the new implementation of SBValue::Cast(SBType). Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general improvements to the API. Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't correctly handle not having a target. llvm-svn: 149743
* http://llvm.org/bugs/show_bug.cgi?id=11618Johnny Chen2012-01-061-1/+23
| | | | | | | | lldb::SBValue::AddressOf does not work on dereferenced registers in synthetic children provider Patch submitted by Enrico Granata. llvm-svn: 147637
* http://llvm.org/bugs/show_bug.cgi?id=11588Johnny Chen2011-12-164-0/+139
| | | | | | | | | | | | | valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider Patch from Enrico Granata: The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem. The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own. Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly. llvm-svn: 146768
* Fix objc runtime warnings from the inferior program.Johnny Chen2011-11-153-7/+9
| | | | llvm-svn: 144717
* Removed the @expectedFailure decorators from test cases. They have been ↵Johnny Chen2011-10-241-5/+3
| | | | | | fixed with the r142717 check-in. llvm-svn: 142823
* Fix the last testsuite regression from the apple-names stuff.Jim Ingham2011-10-081-16/+16
| | | | llvm-svn: 141468
* Fixed a problem with the IR interpreter that causedSean Callanan2011-09-221-4/+0
| | | | | | | | | | | | it to generate result variables that were not bound to their underlying data. This allowed the SBValue class to use the interpreter (if possible). Also made sure that any result variables that point to stack allocations in the stack frame of the interpreted expressions do not get live data. llvm-svn: 140285
* Add four new expectedFailre decorators to new failures most likely due to ↵Johnny Chen2011-09-201-0/+4
| | | | | | r139772 check-in. llvm-svn: 140150
* Redesign of the interaction between Python and frozen objects:Enrico Granata2011-09-065-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored in frozen objects ; now such reads transparently move from host to target as required - as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also removed code that enabled to recognize an expression result VO as such - introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO representing a T* or T[], and doing dereferences transparently in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData - as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it en lieu of doing the raw read itself - introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers, this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory) in public layer this returns an SBData, just like GetPointeeData() - introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values - added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing Solved a bug where global pointers to global variables were not dereferenced correctly for display New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128 Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file addresses that generate file address children UNLESS we have a live process) Updated help text for summary-string Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers Edited the syntax and help for some commands to have proper argument types llvm-svn: 139160
* Fix compile warning.Johnny Chen2011-08-241-0/+1
| | | | llvm-svn: 138465
* Remove the expectedFailure decorator. The test has been passing for some ↵Johnny Chen2011-08-241-1/+0
| | | | | | time now. llvm-svn: 138452
* Added support for persistent types to theSean Callanan2011-08-233-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression parser. You can use a persistent type like this: (lldb) expr struct $foo { int a; int b; }; (lldb) struct $foo i; i.a = 2; i.b = 3; i ($foo) $0 = { (int) a = 2 (int) b = 3 } typedefs work similarly. This patch affects the following files: test/expression_command/persistent_types/* A test case for persistent types, in particular structs and typedefs. ClangForward.h Added TypeDecl, needed to declare some functions in ASTResultSynthesizer.h ClangPersistentVariables.[h,cpp] Added a list of persistent types to the persistent variable store. ASTResultSynthesizer.[h,cpp] Made the AST result synthesizer iterate across TypeDecls in the expression, and record any persistent types found. Also made a minor documentation fix. ClangUserExpression.[h,cpp] Extended the user expression class to keep the state needed to report the persistent variable store for the target to the AST result synthesizers. Also introduced a new error code for expressions that executed normally but did not return a result. CommandObjectExpression.cpp Improved output for expressions (like declarations of new persistent types) that don't return a result. This is no longer treated as an error. llvm-svn: 138383
* Cleaned up the SBType.h file to not include internal headers and reorganizedGreg Clayton2011-08-031-5/+5
| | | | | | | | | | | | | | | | | | the SBType implementation classes. Fixed LLDB core and the test suite to not use deprecated SBValue APIs. Added a few new APIs to SBValue: int64_t SBValue::GetValueAsSigned(int64_t fail_value=0); uint64_t SBValue::GetValueAsUnsigned(uint64_t fail_value=0) llvm-svn: 136829
* Remove the @expectedFailure decorator since the bug has been fixed.Johnny Chen2011-08-011-4/+4
| | | | | | rdar://problem/9673664 llvm-svn: 136633
* Add regression test for rdar://problem/9531204.Johnny Chen2011-07-283-0/+76
| | | | llvm-svn: 136425
* Add test case for rdar://problem/9673664.Johnny Chen2011-07-283-0/+68
| | | | llvm-svn: 136409
* Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path, ↵Johnny Chen2011-07-111-3/+2
| | | | | | | | | | | | stdout_path, and stderr_path is just wrong and resulted in the inferior's output getting mixed into the GDB remote communication's log file. Change all test cases to not pass os.ctermid() and either use SBTarget.LaunchSimple() or SBTarget.Launch() and pass None as stdin_path/stdout_path/srderr_path to use a pseudo terminal. rdar://problem/9716499 program output is getting mixed into the GDB remote communications llvm-svn: 134940
* The lldbtest.TestBase.DebugSBValue(self, val) method call now does not need ↵Johnny Chen2011-07-111-5/+5
| | | | | | | | the frame argument. Only the val (of SBValue type) argument is needed. llvm-svn: 134915
* Add @expectedFailure for TestCallStdStringFunction.py (radar was filed) andJohnny Chen2011-06-281-2/+4
| | | | | | | remove @expectedFailure from TestObjCMethods.py's print_ivars_correctly() function (it has been passing for a while). llvm-svn: 134022
* The extra burden for the Python API test case to assign its process object ↵Johnny Chen2011-06-151-5/+5
| | | | | | | | | to self.process in order to have its process cleaned up (terminated) upon tearDown is gone for good. Let's simplify a bunch of Python API test cases. llvm-svn: 133097
* Now that we have added a post-processing step for adding truth value testing toJohnny Chen2011-05-241-3/+3
| | | | | | | those lldb objects which implement the IsValid() method, let's change the rest of the test suite to use the more compact truth value testing pattern (the Python way). llvm-svn: 131970
* Add radar info.Johnny Chen2011-05-191-0/+1
| | | | llvm-svn: 131681
* Add TestCallStdStringFunction.py which calls std::string member functions ↵Johnny Chen2011-05-193-0/+78
| | | | | | while stopped on a breakpoint. llvm-svn: 131680
* Introduced support for UnknownAnyTy, the Clang typeSean Callanan2011-05-121-19/+19
| | | | | | | | | | | | | | | | | | | representing variables whose type must be inferred from the way they are used. Functions without debug information now return UnknownAnyTy and must be cast. Variables with no debug information are not yet using UnknownAnyTy; instead they are assumed to be void*. Support for variables of unknown type is coming (and, in fact, some relevant support functions are included in this commit) but will take a bit of extra effort. The testsuite has also been updated to reflect the new requirement that the result of printf be cast, i.e. expr (int) printf("Hello world!") llvm-svn: 131263
* More string matching criterion.Johnny Chen2011-05-101-1/+1
| | | | llvm-svn: 131165
* Add TestObjCTypeQueryFromOtherCompileUnit.py to test that when stopped in ↵Johnny Chen2011-05-104-0/+109
| | | | | | | | | | | | | | the 'main.c' compile unit, which has an external reference to symbols defined in foo.m, the type query: in this case, 'expression (NSArray*)array_token' continues to work. This test is to accompany http://llvm.org/viewvc/llvm-project?rev=131145&view=rev. llvm-svn: 131154
* Add TestExprs2.py for recent check-ins related to the 'expression' subsystem.Johnny Chen2011-05-091-0/+66
| | | | llvm-svn: 131111
* Change the rest of lldbutil.py's function names to all lower case formats to ↵Johnny Chen2011-04-271-3/+3
| | | | | | | | be consistent. And modify the test cases accordingly. llvm-svn: 130314
* For lldbutil.py, Change a bunch of function names to all lower case formats ↵Johnny Chen2011-04-251-2/+2
| | | | | | | | to be consistent. And modify the test cases accordingly. llvm-svn: 130174
* Modify test scripts to accomodate SBTarget.Launch() API change.Johnny Chen2011-02-031-1/+1
| | | | llvm-svn: 124828
* Deprecated old forms of SBTarget::Launch. There is not just one and noGreg Clayton2011-01-231-3/+3
| | | | | | SWIG renaming done to work around deprecated APIs. llvm-svn: 124075
* Change the golden output so that merely evaluating an existing persistent ↵Johnny Chen2010-12-141-2/+6
| | | | | | | | | variable does not result in a newly created persistent variable. The old one is returned, instead. llvm-svn: 121775
* Fix a test method docstring.Johnny Chen2010-12-101-1/+1
| | | | llvm-svn: 121446
* Add an infrastructure to mark the Python APIs only test using a decorator.Johnny Chen2010-12-101-4/+4
| | | | | | | | | | | | | | | | | | Example: @python_api_test def test_evaluate_expression_python(self): """Test SBFrame.EvaluateExpression() API for evaluating an expression.""" ... The opposite of Python APIs only test is an lldb command line test, which sends commands to the lldb command interpreter. Add a '-a' option to the test driver to skip Python API only tests. Modify TestExprs.py to mark a test as @python_api_test and remove an @expectedFailure decorator as the bug has been fixed. llvm-svn: 121442
* Add more module docstring.Johnny Chen2010-12-091-0/+9
| | | | llvm-svn: 121421
* Add test_evaluate_expression_python() to exercise ↵Johnny Chen2010-12-081-1/+85
| | | | | | | | | SBFrame.EvaluateExpression() Python API. Launch the process with ['X', 'Y', 'Z'] as the args to make argc == 4 and verify that's the case, plus some other EvaluateExpression() calls. llvm-svn: 121218
* Use Python raw string literal to avoid escaping the escape sequence and to makeJohnny Chen2010-12-071-7/+7
| | | | | | the command given to lldb command interpreter more readable. llvm-svn: 121199
* Make the various expression command test sequences more strict by also verifyingJohnny Chen2010-12-071-7/+17
| | | | | | the results against our golden ones. llvm-svn: 121185
* Add a test sequence for test_expr_commands_can_handle_quotes(self):Johnny Chen2010-12-071-3/+24
| | | | | | | | | | | | | # runCmd: command alias print_hi expression printf ("\n\tHi!") # output: self.runCmd('command alias print_hi expression printf ("\\n\\tHi!")') # This fails currently. self.runCmd('print_hi') and modify existing test sequences to escape the escape character '\ to prevent it from being interpreted by Python before passing on to the lldb command interpreter. llvm-svn: 121183
* Add two test cases to exercise many expression commands:Johnny Chen2010-12-061-0/+98
| | | | | | | | | | | | | o test_many_expr_commands() o test_expr_commands_can_handle_quotes() Mark test_expr_commands_can_handle_quotes() as @expectedFailure: # rdar://problem/8686536 # CommandInterpreter::HandleCommand is stripping \'s from input for WantsRawCommand commands llvm-svn: 121019
* Use full command to avoid "expr" alias.Greg Clayton2010-12-061-22/+22
| | | | | | Add bug number for current expected failures. llvm-svn: 120976
* Added a simple test case that can be used to test out the expression parserGreg Clayton2010-12-062-0/+38
| | | | | | more completely. Example expressions are in the comments. llvm-svn: 120975
* Remove @skip decorators for fixed crashes.Johnny Chen2010-11-301-1/+0
| | | | llvm-svn: 120479
* Entire test class skipped due to:Johnny Chen2010-11-301-0/+1
| | | | | | rdar://problem/8710994 Assertion failed: (reg_info) GDBRemoteRegisterContext.cpp, line 199 llvm-svn: 120432
* Move the persistent_variables directory under expression_command directory.Johnny Chen2010-11-093-0/+63
| | | | llvm-svn: 118591
* Add a test for expression parser crash which has been fixed.Johnny Chen2010-11-093-0/+102
llvm-svn: 118590
OpenPOWER on IntegriCloud