summaryrefslogtreecommitdiffstats
path: root/lldb/test/load_unload/TestLoadUnload.py
Commit message (Collapse)AuthorAgeFilesLines
* Move top level test dirs inlined_breakpoints, load_unload, and ↵Johnny Chen2011-06-271-218/+0
| | | | | | embedded_interpreter to reside under functionalities. llvm-svn: 133918
* o lldbtest.py:Johnny Chen2011-06-231-0/+1
| | | | | | | | | | | | | | | | | | Assign the test method name to self.testMethodName. This can be useful for the test directory (see test/types for a good example) which houses a bunch of executables compiled from different source files. The default build action is to create a.out as the binary executable, which can confuse the module cacheing mechanism and result in the debugger getting a stale image as the target to be debugged, and chaos ensues. o AbstractBase.py, TestThreadAPI.py: Use self.testMethodName to our advantage. o TestLoadUnload.py: Add expected failure marker to test case test_modules_search_paths(). llvm-svn: 133768
* Modify the test case related to "target modules search-paths" as it suffers ↵Johnny Chen2011-05-061-7/+11
| | | | | | from code rotting. llvm-svn: 131038
* Remove debug statement.Johnny Chen2011-05-031-1/+1
| | | | llvm-svn: 130802
* Modify test_image_search_paths(self) to check for the pattern ↵Johnny Chen2011-05-031-0/+3
| | | | | | | | "%s-[^-]*-[^-]*" % self.getArchitecture() from the output of running 'image list -t 3' command which lists the triples of the image list. llvm-svn: 130777
* Centralized a lot of the status information for processes,Greg Clayton2011-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | threads, and stack frame down in the lldb_private::Process, lldb_private::Thread, lldb_private::StackFrameList and the lldb_private::StackFrame classes. We had some command line commands that had duplicate versions of the process status output ("thread list" and "process status" for example). Removed the "file" command and placed it where it should have been: "target create". Made an alias for "file" to "target create" so we stay compatible with GDB commands. We can now have multple usable targets in lldb at the same time. This is nice for comparing two runs of a program or debugging more than one binary at the same time. The new command is "target select <target-idx>" and also to see a list of the current targets you can use the new "target list" command. The flow in a debug session can be: (lldb) target create /path/to/exe/a.out (lldb) breakpoint set --name main (lldb) run ... hit breakpoint (lldb) target create /bin/ls (lldb) run /tmp Process 36001 exited with status = 0 (0x00000000) (lldb) target list Current targets: target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) * target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) target select 0 Current targets: * target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) bt * thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1 frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16 frame #1: 0x0000000100000b64 a.out`start + 52 Above we created a target for "a.out" and ran and hit a breakpoint at "main". Then we created a new target for /bin/ls and ran it. Then we listed the targest and selected our original "a.out" program, so we showed two concurent debug sessions going on at the same time. llvm-svn: 129695
* Change "breakpoint list" command to default to brief output rather than full ↵Caroline Tice2011-02-041-2/+2
| | | | | | | | | output. Modify test cases in test suite to either expect brief output or to pass -f for full output as appropriate. llvm-svn: 124905
* Add teardown hook to clear image-search-paths after the test.Johnny Chen2011-02-031-0/+2
| | | | llvm-svn: 124806
* Add a test case test_image_search_paths() to test lldb's ability to do image ↵Johnny Chen2011-02-031-0/+35
| | | | | | | | | | | | | | | search paths substitutions in order to achieve file mappings. Modify CommandObjectTarget.cpp to properly set the status of the return object to make scripting like this: self.runCmd("target image-search-paths add %s %s" % (os.getcwd(), new_dir)) works. llvm-svn: 124762
* Execute the test case teardown hooks in a LIFO (last in, first out) order.Johnny Chen2010-12-141-2/+3
| | | | | | | ALso add a teardown hook to the LoadUnloadTestCase.test_dyld_library_path() test case to have it restore the DYLD_LIBRARY_PATH environment variable. llvm-svn: 121802
* Added a test case LoadUnloadTestCase.test_dyld_library_path to test ↵Johnny Chen2010-12-141-2/+57
| | | | | | | | | launching a process linked with a dylib which has been relocated by specifying the DYLD_LIBRARY_PATH environment variable. Test that the function name breakpoint defined in the dylib is resolved. llvm-svn: 121796
* Add a test case test_lldb_process_load_and_unload_commands() for using lldb ↵Johnny Chen2010-12-061-0/+58
| | | | | | | | | commands 'process load' and 'process unload' to load and unload shared library from lldb command lines. llvm-svn: 121036
* Really remove the @expectedFailure decorator this time.Johnny Chen2010-11-031-1/+0
| | | | llvm-svn: 118180
* Remove the @expectedFailure decorator. The bug rdar://problem/8508987 has ↵Johnny Chen2010-11-031-1/+0
| | | | | | been fixed. llvm-svn: 118179
* Add more bug info.Johnny Chen2010-10-201-0/+3
| | | | llvm-svn: 116950
* The StateType representation has been changed. Modify the test cases to ↵Johnny Chen2010-10-181-2/+2
| | | | | | accommodate. llvm-svn: 116705
* Remove file:lineno from the expected substrings. Matching 'a_function, i.e.,Johnny Chen2010-10-041-13/+13
| | | | | | | | the {function.name}, is sufficient for this test case. Plus added @expectedfailure decorator for a filed bug. llvm-svn: 115517
* Added a default build phase at the beginning of test_load_unload() test case.Johnny Chen2010-09-031-0/+4
| | | | llvm-svn: 113039
* Changed the test case class names to be noun-like instead of verb-like.Johnny Chen2010-09-011-1/+1
| | | | llvm-svn: 112732
* Added a test case test_breakpoint_creation_by_filespec_python() which creates aJohnny Chen2010-08-271-1/+1
| | | | | | | | breakpoint by FileSpec and line number and exercises some FileSpec APIs. Also, RUN_STOPPED is a bad assert name, RUN_SUCCEEDED is better. llvm-svn: 112327
* Print the verbose output of runCmd()/expect() to stderr instead of stdout.Johnny Chen2010-08-201-40/+21
| | | | | | And converted the rest of the test cases to runCmd()/expect(). llvm-svn: 111677
* Added more informational assert message strings.Johnny Chen2010-08-191-2/+2
| | | | llvm-svn: 111536
* Factored the "continue" command execution of the inferior process as part of theJohnny Chen2010-08-161-4/+1
| | | | | | | | | cleanup before finish into the test fixture in lldbtest.TestBase.tearDown(). Derivatives of TestBase is responsible for setting self.runStarted to True if an inferior process has been started. llvm-svn: 111188
* Modified the remaining test cases to display more meaningful assert messages.Johnny Chen2010-08-091-9/+12
| | | | | | Added a generic message generator to the lldbtest.py base module. llvm-svn: 110625
* o Added unittest2 which has added the new features in unittest for Python 2.7Johnny Chen2010-08-051-2/+2
| | | | | | | | | | | | | | backported to Python 2.3+. Some of the features desired include better verbose reporting in unittest2.TextTestRunner and decorator support for skipping tests and expected failures. http://pypi.python.org/pypi/unittest2 o Modified the existing .py tests to use unittest2 and decorated TestSTL.test_step_into_stl(), which is known to always fail currently, with @unittest2.expectedFailure. llvm-svn: 110397
* When running a single test case, lldb.SBDebugger.Terminate() is not being calledJohnny Chen2010-08-051-1/+2
| | | | | | | because unittest.main() calls sys.exit() before returning. Fixed by registering an exit handler for this situation. llvm-svn: 110379
* Fixed typos from cut-and-paste errors.Johnny Chen2010-07-271-2/+2
| | | | llvm-svn: 109539
* Test that breakpoint by symbol name works correctly dlopen'ing a dynamic lib.Johnny Chen2010-07-071-0/+72
llvm-svn: 107812
OpenPOWER on IntegriCloud