summaryrefslogtreecommitdiffstats
path: root/lldb/test/foundation
Commit message (Collapse)AuthorAgeFilesLines
* Move global_variables dir to lang/c and foundation dir to lang/objc.Johnny Chen2011-06-2510-883/+0
| | | | llvm-svn: 133883
* The extra burden for the Python API test case to assign its process object ↵Johnny Chen2011-06-151-3/+3
| | | | | | | | | 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-242-9/+9
| | | | | | | 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 TestObjCTypeQueryFromOtherCompileUnit.py to test that when stopped in ↵Johnny Chen2011-05-101-2/+2
| | | | | | | | | | | | | | 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
* Change "frame var" over to using OptionGroups (and thus the ↵Jim Ingham2011-05-041-4/+4
| | | | | | | | | OptionGroupVariableObjectDisplay). Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target, and dynamic with running target. llvm-svn: 130832
* Modify the test suite and lldbutil.py to utilize the Python iteration ↵Johnny Chen2011-04-281-2/+1
| | | | | | | | pattern now that the lldb iteration protocol has been added to lldb.py module. llvm-svn: 130452
* Change the rest of lldbutil.py's function names to all lower case formats to ↵Johnny Chen2011-04-271-2/+2
| | | | | | | | be consistent. And modify the test cases accordingly. llvm-svn: 130314
* Converted to use SBProcess.LaunchSimple().Johnny Chen2011-04-191-2/+1
| | | | llvm-svn: 129782
* Moved the execution context that was in the Debugger intoGreg Clayton2011-04-122-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the CommandInterpreter where it was always being used. Make sure that Modules can track their object file offsets correctly to allow opening of sub object files (like the "__commpage" on darwin). Modified the Platforms to be able to launch processes. The first part of this move is the platform soon will become the entity that launches your program and when it does, it uses a new ProcessLaunchInfo class which encapsulates all process launching settings. This simplifies the internal APIs needed for launching. I want to slowly phase out process launching from the process classes, so for now we can still launch just as we used to, but eventually the platform is the object that should do the launching. Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able to launch processes with all of the new eLaunchFlag settings. Modified any code that was manually launching processes to use the Host::LaunchProcess functions. Fixed an issue where lldb_private::Args had implicitly defined copy constructors that could do the wrong thing. This has now been fixed by adding an appropriate copy constructor and assignment operator. Make sure we don't add empty ModuleSP entries to a module list. Fixed the commpage module creation on MacOSX, but we still need to train the MacOSX dynamic loader to not get rid of it when it doesn't have an entry in the all image infos. Abstracted many more calls from in ProcessGDBRemote down into the GDBRemoteCommunicationClient subclass to make the classes cleaner and more efficient. Fixed the default iOS ARM register context to be correct and also added support for targets that don't support the qThreadStopInfo packet by selecting the current thread (only if needed) and then sending a stop reply packet. Debugserver can now start up with a --unix-socket (-u for short) and can then bind to port zero and send the port it bound to to a listening process on the other end. This allows the GDB remote platform to spawn new GDB server instances (debugserver) to allow platform debugging. llvm-svn: 129351
* Call self.setTearDownCleanup() and pass a proper dictionay to properly cleanupJohnny Chen2011-02-251-0/+2
| | | | | | the intermediate files built with the same dictionary during test execution. llvm-svn: 126530
* Instead of self.runCmd(), do a stronger self.expect("process status") which alsoJohnny Chen2011-02-111-1/+3
| | | | | | checks that the process is stopped due to breakpoint at the specified line no. llvm-svn: 125400
* Add TestConstStrings.py under foundation dir for testing expression parser ↵Johnny Chen2011-02-103-1/+68
| | | | | | | | on objective-c strings and constant strings. llvm-svn: 125320
* Fixes for two bugs:Sean Callanan2011-02-101-0/+23
| | | | | | | | | | | | | - Objective-C constant strings were being NULL-terminated erroneously. - Empty Objective-C constant strings were not being generated correctly. Also added the template for a test of these fixes. llvm-svn: 125314
* Modify test scripts to accomodate SBTarget.Launch() API change.Johnny Chen2011-02-032-2/+2
| | | | llvm-svn: 124828
* Deprecated old forms of SBTarget::Launch. There is not just one and noGreg Clayton2011-01-232-2/+4
| | | | | | SWIG renaming done to work around deprecated APIs. llvm-svn: 124075
* Add an expression command:Johnny Chen2011-01-142-1/+3
| | | | | | | | expression (int)[nil_mutable_array count] within NSArray_expr() function and expect a return of 0. llvm-svn: 123454
* Fixed an error in the type map for "char **" that was a bad memory smasher.Greg Clayton2011-01-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Anytime we had a valid python list that was trying to go from Python down into our C++ API, it was allocating too little memory and it ended up smashing whatever was next to the allocated memory. Added typemap conversions for "void *, size_t" so we can get SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t" so we can get SBProcess::WriteMemory() to work. Fixed an issue in the DWARF parser where we weren't correctly calculating the DeclContext for all types and classes. We now should be a lot more accurate. Fixes include: enums should now be setting their parent decl context correctly. We saw a lot of examples where enums in classes were not being properly namespace scoped. Also, classes within classes now get properly scoped. Fixed the objective C runtime pointer checkers to let "nil" pointers through since these are accepted by compiled code. We also now don't call "abort()" when a pointer doesn't validate correctly since this was wreaking havoc on the process due to the way abort() works. We now just dereference memory which should give us an exception from which we can easily and reliably recover. llvm-svn: 123428
* Updated comment.Johnny Chen2011-01-031-1/+0
| | | | llvm-svn: 122767
* Fix one of the golden output of "frame variable -t *self" to be:Johnny Chen2010-12-151-1/+1
| | | | | | "(MyString) *self" llvm-svn: 121907
* Added a test for finding the correct values for ivars when a property causes ↵Jim Ingham2010-12-155-6/+84
| | | | | | | | the ivar offsets in the DWARF to be incorrect. llvm-svn: 121894
* Fixed the "expression" command object to use the ↵Greg Clayton2010-12-151-1/+1
| | | | | | | | | | | | | StackFrame::GetValueForExpressionPath() function and also hooked up better error reporting for when things fail. Fixed issues with trying to display children of pointers when none are supposed to be shown (no children for function pointers, and more like this). This was causing child value objects to be made that were correctly firing an assertion. llvm-svn: 121841
* Add @python_api_test decorator to the remaining Test*.py files.Johnny Chen2010-12-101-0/+2
| | | | llvm-svn: 121448
* Modify the TestObjCMethods2.py test to fix a typo (should be str_id, not id).Johnny Chen2010-12-082-6/+10
| | | | | | | | Also, add bug info for expected failures that remain: <rdar://problem/8741897> Expressions should support properties llvm-svn: 121268
* For SBTarget.Launch()/LaunchProcess(), there's no need to pass an empty stringJohnny Chen2010-12-081-1/+1
| | | | | | | | | | | | | | as the args and the envs to the launched process. o lldbtest.py: Forgot to check in some assertion messages changes for lldbtest.py. o dotest.py: Also add "api" category to the default lldb log option list. llvm-svn: 121220
* Add test/foundation/TestSymbolTable.py to exercise accessing the symbol tableJohnny Chen2010-12-071-0/+81
| | | | | | entries (including synthesized properties) through the lldb Python APIs. llvm-svn: 121168
* The do_simple_disasm() also needs to be modified to accommodate the recent ↵Johnny Chen2010-12-071-0/+4
| | | | | | | | changes to main.m. llvm-svn: 121150
* Add expect matching patterns for some self.expect() statements.Johnny Chen2010-12-071-6/+12
| | | | llvm-svn: 121077
* Add TestObjCMethods2.py to exercise more expression command sequences with objc.Johnny Chen2010-12-061-0/+145
| | | | | | | | | | | | Mark NSArray_expr() and NSString_expr() as currently failing. Both are called from dsym and dwarf builds. So that makes the num of expected failures equal 4. ---------------------------------------------------------------------- Ran 6 tests in 19.856s OK (expected failures=4) llvm-svn: 121068
* Minor comment string change.Johnny Chen2010-12-061-1/+1
| | | | llvm-svn: 121063
* More descriptive comment string.Johnny Chen2010-12-061-1/+1
| | | | llvm-svn: 121062
* Modify Test_Selector's comment string, too.Johnny Chen2010-12-061-1/+1
| | | | llvm-svn: 121052
* Disambiguate the comment strings in order to be used from the .py test file.Johnny Chen2010-12-061-2/+2
| | | | llvm-svn: 121051
* Modified main.m and TestObjCMethods.py to unbreak the test/foundation directory.Johnny Chen2010-12-062-0/+13
| | | | llvm-svn: 121046
* Added more test case functions to cover more objective C functionality.Greg Clayton2010-12-061-9/+72
| | | | llvm-svn: 121027
* Remove @skip decorators for fixed crashes.Johnny Chen2010-11-301-2/+0
| | | | llvm-svn: 120479
* Skipped two test cases due to seg fault while hadnling command:Johnny Chen2010-11-301-0/+2
| | | | | | | | | | Application Specific Information: HandleCommand(command = "expression self->str") radar:8711052 llvm-svn: 120431
* Added an "Interrupted" bit to the ProcessEventData. Halt now generates an eventJim Ingham2010-11-171-0/+16
| | | | | | | | | with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events. DoHalt is changed to ensure that the stop even is processed, and an event with the Interrupted event is posted. Finally ClangFunction is rationalized to use this facility so the that Halt is handled more deterministically. llvm-svn: 119453
* Fixed the initWithNSString: function to properly initialize self.Greg Clayton2010-11-141-3/+5
| | | | llvm-svn: 119091
* Run commands 'expression self->str' and 'expression self->date'.Johnny Chen2010-11-121-5/+2
| | | | | | They should not fail. llvm-svn: 118868
* Added a simple test for:Johnny Chen2010-11-111-0/+4
| | | | | | | rdar://problem/8651752 don't crash trying to ask clang how many children an empty record has llvm-svn: 118820
* The r117616 check in broken these two test cases:Johnny Chen2010-10-291-4/+4
| | | | | | | | | | | | | | 1. FoundationDisassembleTestCase.test_simple_disasm_with_dsym; and 2. FoundationDisassembleTestCase.test_simple_disasm_with_dwarf the reason being the test was issuing 'disassemble' command to disassemble the current frame function when stopped. The 'disassemble' command worked previously but it was a result of bad option specification. Fix the disassemble command so that it will require 'disassemble -f' for disassembly of the current frame function. llvm-svn: 117688
* Modify the command passed to command interpreter from 'expr' (which is an ↵Johnny Chen2010-10-191-6/+7
| | | | | | | | alias of 'expression') to 'expression' to avoid cases where 'expr' has been unaliased. llvm-svn: 116780
* Remove the @expectedFailure decorators, as rdar://problem/8542091 is ↵Johnny Chen2010-10-151-4/+3
| | | | | | | | supposed to be fixed. Also change the expected matching pattern of the 'expr -o -- my' output. llvm-svn: 116645
* Remove the @skip("Skip due to deadlock?") decorators. Change the command toJohnny Chen2010-10-151-3/+1
| | | | | | | | 'breakpoint delete 1' from 'breakpoint delete'. With 'breakpoint delete', the command interpreter was asking for a confirmation from the user, which there isn't any. llvm-svn: 116610
* This is an initial version of test driver enhanceent to be able to dump theJohnny Chen2010-10-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | session info after a test case failure, allowing more direct inspection of debugger session which leads to the test failure. For a simple usage scenario: [18:06:26] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log ... [18:14:43] johnny:/Volumes/data/lldb/svn/trunk/test $ ls -l .session-* -rw-r--r-- 1 johnny admin 1359 Oct 14 18:06 .session-TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command -rw-r--r-- 1 johnny admin 2054 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dsym_and_expr_parser -rw-r--r-- 1 johnny admin 2055 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_expr_parser -rw-r--r-- 1 johnny admin 1351 Oct 14 17:57 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command [18:14:51] johnny:/Volumes/data/lldb/svn/trunk/test $ The test case which failed will have its recorded session info dumped to a .session-* file in the current working directory. For test suite using relocated directory, expect to find the .session-* files there. In this checkin, I also add @skip decorator to the two test methods in test/foundation/TestObjCMethods.py as it looks like the test suite is deadlocking when running the tests. More investigations are needed. llvm-svn: 116552
* Make calling the super class's setUp() method less fragile.Johnny Chen2010-10-141-1/+2
| | | | llvm-svn: 116490
* Apply (query-replace "frame variable" "frame variable -t") and fix a comment ↵Johnny Chen2010-10-131-4/+4
| | | | | | | | about 'expr var', not 'frame variable var'. llvm-svn: 116419
* Forgor to also check in this change with r116337.Johnny Chen2010-10-121-1/+1
| | | | llvm-svn: 116340
* Update the @expectedFailure decorator with additional bug info:Johnny Chen2010-10-121-18/+48
| | | | | | | | | | rdar://problem/8542091 test/foundation: expr -o -- my not working? Add an additional test for 'frame variable *self' when stopped in '-[MyString initWithNSString:]' and move the 'expr -o -- self' to after MyString has been constructed and change it to 'expr -o -- my'. llvm-svn: 116337
* The 'regexp-break' command now prints out the command that results fromJohnny Chen2010-10-122-4/+4
| | | | | | | | | | | | | | expanding the regular expression command. So change the more stringent: self.expect(..., startstr = matching_string) to: self.expect(..., substrs = [matched_string]) to pass the test. llvm-svn: 116331
OpenPOWER on IntegriCloud