summaryrefslogtreecommitdiffstats
path: root/lldb/test/load_unload
Commit message (Collapse)AuthorAgeFilesLines
* Move top level test dirs inlined_breakpoints, load_unload, and ↵Johnny Chen2011-06-278-394/+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
* Parametrize make variable CC to also test with clang.Johnny Chen2011-02-031-10/+14
| | | | llvm-svn: 124763
* 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-143-3/+61
| | | | | | | | | 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
* Modified LLDB expressions to not have to JIT and run code just to see variableGreg Clayton2010-12-142-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values or persistent expression variables. Now if an expression consists of a value that is a child of a variable, or of a persistent variable only, we will create a value object for it and make a ValueObjectConstResult from it to freeze the value (for program variables only, not persistent variables) and avoid running JITed code. For everything else we still parse up and JIT code and run it in the inferior. There was also a lot of clean up in the expression code. I made the ClangExpressionVariables be stored in collections of shared pointers instead of in collections of objects. This will help stop a lot of copy constructors on these large objects and also cleans up the code considerably. The persistent clang expression variables were moved over to the Target to ensure they persist across process executions. Added the ability for lldb_private::Target objects to evaluate expressions. We want to evaluate expressions at the target level in case we aren't running yet, or we have just completed running. We still want to be able to access the persistent expression variables between runs, and also evaluate constant expressions. Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects can now dump their contents with the UUID, arch and full paths being logged with appropriate prefix values. Thread hardened the Communication class a bit by making the connection auto_ptr member into a shared pointer member and then making a local copy of the shared pointer in each method that uses it to make sure another thread can't nuke the connection object while it is being used by another thread. Added a new file to the lldb/test/load_unload test that causes the test a.out file to link to the libd.dylib file all the time. This will allow us to test using the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else. llvm-svn: 121745
* Forgot to also check in this file with the previous r121036 change:Johnny Chen2010-12-061-1/+1
| | | | | | /lldb/trunk/test/load_unload/TestLoadUnload.py llvm-svn: 121045
* 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
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-086-0/+148
llvm-svn: 105619
OpenPOWER on IntegriCloud