summaryrefslogtreecommitdiffstats
path: root/lldb/test/bitfields/TestBitfields.py
Commit message (Collapse)AuthorAgeFilesLines
* Move some directories to now reside under lang/c or lang/cpp.Johnny Chen2011-06-251-155/+0
| | | | llvm-svn: 133881
* The extra burden for the Python API test case to assign its process object ↵Johnny Chen2011-06-151-2/+2
| | | | | | | | | 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
* Change "frame var" over to using OptionGroups (and thus the ↵Jim Ingham2011-05-041-2/+2
| | | | | | | | | 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
* 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
* Convert some tests to use the SBProcess.LaunchSimple API requiring only ↵Johnny Chen2011-04-191-2/+1
| | | | | | | | args, envs, and cwd from SBProcess.Launch which takes many more arguments that are useless for the test scenario. llvm-svn: 129776
* Centralized a lot of the status information for processes,Greg Clayton2011-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | output. Modify test cases in test suite to either expect brief output or to pass -f for full output as appropriate. llvm-svn: 124905
* 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-1/+2
| | | | | | SWIG renaming done to work around deprecated APIs. llvm-svn: 124075
* Modify test cases to accomodate Python API change:Johnny Chen2010-12-141-1/+1
| | | | | | | o SBFrame.LookupVar -> FindVariable o SBFrame.LookupVarInScope -> FindValue llvm-svn: 121782
* Add @python_api_test decorator to the remaining Test*.py files.Johnny Chen2010-12-101-5/+3
| | | | llvm-svn: 121448
* 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
* Slight changes to how to phrase the assert for Python API ↵Johnny Chen2010-11-101-3/+4
| | | | | | thread.GetStopReason(). llvm-svn: 118731
* Finish adding the actual stop reason as part of the assert message when ↵Johnny Chen2010-11-101-2/+1
| | | | | | | | asserting: thread.GetStopReason() == lldb.eStopReasonBreakpoint llvm-svn: 118713
* Add the actual stop reason to an assert message for bitfields_variable_python()Johnny Chen2010-11-101-1/+3
| | | | | | | | test method when asserting: thread.GetStopReason() == lldb.eStopReasonBreakpoint llvm-svn: 118711
* The StateType representation has been changed. Modify the test cases to ↵Johnny Chen2010-10-181-1/+1
| | | | | | accommodate. llvm-svn: 116705
* Fixed an expression parsing issue where if you were stopped somewhere withoutGreg Clayton2010-10-141-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug information and you evaluated an expression, a crash would occur as a result of an unchecked pointer. Added the ability to get the expression path for a ValueObject. For a rectangle point child "x" the expression path would be something like: "rect.top_left.x". This will allow GUI and command lines to get ahold of the expression path for a value object without having to explicitly know about the hierarchy. This means the ValueObject base class now has a "ValueObject *m_parent;" member. All ValueObject subclasses now correctly track their lineage and are able to provide value expression paths as well. Added a new "--flat" option to the "frame variable" to allow for flat variable output. An example of the current and new outputs: (lldb) frame variable argc = 1 argv = 0x00007fff5fbffe80 pt = { x = 2 y = 3 } rect = { bottom_left = { x = 1 y = 2 } top_right = { x = 3 y = 4 } } (lldb) frame variable --flat argc = 1 argv = 0x00007fff5fbffe80 pt.x = 2 pt.y = 3 rect.bottom_left.x = 1 rect.bottom_left.y = 2 rect.top_right.x = 3 rect.top_right.y = 4 As you can see when there is a lot of hierarchy it can help flatten things out. Also if you want to use a member in an expression, you can copy the text from the "--flat" output and not have to piece it together manually. This can help when you want to use parts of the STL in expressions: (lldb) frame variable --flat argc = 1 argv = 0x00007fff5fbffea8 hello_world._M_dataplus._M_p = 0x0000000000000000 (lldb) expr hello_world._M_dataplus._M_p[0] == '\0' llvm-svn: 116532
* 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-2/+2
| | | | | | | | about 'expr var', not 'frame variable var'. llvm-svn: 116419
* Avoid using hardcoded line number to break on. Use the line_number() utilityJohnny Chen2010-10-121-3/+10
| | | | | | function to get the line number to break on during setUp(). llvm-svn: 116275
* Clean up the StateType and StopReason enums now that they reside in the lldb ↵Johnny Chen2010-10-071-1/+1
| | | | | | module. llvm-svn: 115922
* Added comments about the usage of int(string, 0) and long(string, 0) which passJohnny Chen2010-09-241-0/+3
| | | | | | | a base of 0 so that the radix of the string is determined based on the contents of string. llvm-svn: 114764
* Made 'frame variable' printing of unsigned types more readable, like gdb.Johnny Chen2010-09-241-22/+22
| | | | llvm-svn: 114739
* Removed the two expectedFailure decorators from the test cases. They have ↵Johnny Chen2010-09-131-2/+0
| | | | | | been fixed. llvm-svn: 113750
* Moved the process cleanup of Script-Bridge-based APIs into TestBase.tearDown()Johnny Chen2010-09-021-0/+3
| | | | | | | | | | method where they belong. Also fixed a logic error in maintaining the command interface flag (runStarted) indicating whether the lldb "run"/"process launch" command has been issued. It was erroneously cleared. Modified the test cases to take advantage of the refactoring. llvm-svn: 112863
* (query-replace "variable list" "frame variable")Johnny Chen2010-09-021-5/+5
| | | | llvm-svn: 112824
* Changed the test case class names to be noun-like instead of verb-like.Johnny Chen2010-09-011-1/+1
| | | | llvm-svn: 112732
* Avoid killing the inferior process twice by passing a setCookie=False keywordJohnny Chen2010-09-011-1/+5
| | | | | | | | argument when issuing a "run" lldb command within the test case meant to exercise the Python APIs, but is using the command interface due to certain reason (such as target.LaunchProcess() does not reliably bring up the inferior). llvm-svn: 112682
* Converted TestBitfields.py to Dsym/Dwarf combination.Johnny Chen2010-08-311-2/+25
| | | | llvm-svn: 112646
* Added a test case test_breakpoint_creation_by_filespec_python() which creates aJohnny Chen2010-08-271-2/+2
| | | | | | | | 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
* Added TestHelloWorld.py which exercises the Python APIs for target, breakpoint,Johnny Chen2010-08-271-1/+1
| | | | | | | and process. Added comment within the file about issues of using LaunchProcess of SBTarget to launch a process (rdar://problem/8364687). llvm-svn: 112276
* Added a test case to bitfields which uses the Python APIs from lldb.py.Johnny Chen2010-08-271-0/+55
| | | | | | Added a utility method to TestBase class to debug print an SBValue object. llvm-svn: 112247
* More descriptive method doc string.Johnny Chen2010-08-241-1/+1
| | | | llvm-svn: 111960
* Need a better method name.Johnny Chen2010-08-241-1/+1
| | | | llvm-svn: 111939
* Added test case TestBitfields.py for rdar://problem/8348251, whereJohnny Chen2010-08-241-0/+61
"variable list bits" display bits variable correctly, but not "variable list". llvm-svn: 111937
OpenPOWER on IntegriCloud