summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/process/TestProcessAPI.py
Commit message (Collapse)AuthorAgeFilesLines
* Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path, ↵Johnny Chen2011-07-111-8/+8
| | | | | | | | | | | | 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-3/+3
| | | | | | | | the frame argument. Only the val (of SBValue type) argument is needed. llvm-svn: 134915
* The extra burden for the Python API test case to assign its process object ↵Johnny Chen2011-06-151-12/+12
| | | | | | | | | 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-7/+7
| | | | | | | 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 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
* Use self.TraceOn() API.Johnny Chen2011-04-191-5/+9
| | | | llvm-svn: 129792
* Add support for "dynamic values" for C++ classes. This currently only works ↵Jim Ingham2011-04-161-1/+7
| | | | | | | | | | | | | | | | | | for "frame var" and for the expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will have to be changed to also query for the dynamic types & offsets as it is looking up variables. The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var command to get the dynamic or static value of the variables you are printing. There's also a general setting: target.prefer-dynamic-value (boolean) = 'true' which is consulted if you call "frame var" without supplying a value for the -d option. llvm-svn: 129623
* Add a test case ProcessAPITestCase.test_remote_launch() which tests ↵Johnny Chen2011-03-051-1/+25
| | | | | | | | | | | SBProcess.RemoteLaunch() API with a process not in eStateConnected, and checks that the remote launch failed. Modify SBProcess::RemoteLaunch()/RemoteAttachToProcessWithID()'s log statements to fix a crasher when logging is turned on. llvm-svn: 127055
* Add TestTargetAPI.py:Johnny Chen2011-03-031-6/+10
| | | | | | | | | | | | | | | | | | | | | | | // When stopped on breakppint 1, and then 2, we can get the line entries using // SBFrame API SBFrame.GetLineEntry(). We'll get the start addresses for the // two line entries; with the start address (of SBAddress type), we can then // resolve the symbol context using the SBTarget API // SBTarget.ResolveSymbolContextForAddress(). // // The two symbol context should point to the same symbol, i.e., 'a' function. Add two utility functions to lldbutil.py: o get_stopped_threads(process, reason): return the list of threads with the specified stop reason or an empty list if not found o get_stopped_thread(process, reason): return the first thread with the given stop reason or None if not found llvm-svn: 126916
* Add some comments.Johnny Chen2011-03-021-0/+4
| | | | llvm-svn: 126867
* Add two utility functions to lldbutil.py:Johnny Chen2011-03-021-13/+13
| | | | | | | | | | | | o int_to_bytearray() o bytearray_to_int() They return/interpret the bytearray in the little endian format. For big endian, simply perform ba.reverse() on the bytearray object. And modify TestProcessAPI.py to take advantage of the functions. llvm-svn: 126813
* Add an API SBProcess::GetByteOrder() and add test cases which utilizes ↵Johnny Chen2011-03-011-0/+90
| | | | | | | | | GetByteOrder(), among other SBProcess APIs, to write (int)256 into a memory location of a global variable (int)my_int and reads/checks the variable afterwards. llvm-svn: 126792
* Fix wrong placement of skipUnless() decorator.Johnny Chen2011-03-011-1/+0
| | | | llvm-svn: 126774
* Add test methods for SBProcess.WriteMemory() API to the TestProcessAPI.py file.Johnny Chen2011-03-011-41/+80
| | | | | | This makes the number of total tests equal to 201. llvm-svn: 126769
* Add TestProcessAPI.py which exercises some Python SBProcess API. In ↵Johnny Chen2011-03-011-0/+102
particular, this tests the SBProcess.ReadMemory() API, which, due to SWIG typemap'ing, expects 3 arguments (the location to read from, the size in bytes to read, and an SBError object), and returns the result as a Python string object. On SnowLeopard where this has been tested, the SWIG script needs to be pampered (use the exact same parameter names as in SBProcess.h) in order for this to work. llvm-svn: 126736
OpenPOWER on IntegriCloud