SBProcess.PutSTDIN() needs to be properly typemapped when swigging,

so that we can do Python scripting like this:

        target = self.dbg.CreateTarget(self.exe)

        self.dbg.SetAsync(True)
        process = target.LaunchSimple(None, None, os.getcwd())

        process.PutSTDIN("Line 1 Entered.\n")
        process.PutSTDIN("Line 2 Entered.\n")
        process.PutSTDIN("Line 3 Entered.\n")

Add TestProcessIO.py to exercise the process IO API: PutSTDIN()/GetSTDOUT()/GetSTDERR().

llvm-svn: 145282
This commit is contained in:
Johnny Chen
2011-11-28 21:39:07 +00:00
parent c086f0f91b
commit 49cb85db64
7 changed files with 100 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ import lldb
def fuzz_obj(obj):
obj.GetTarget()
obj.GetByteOrder()
obj.PutSTDIN("my data", 7)
obj.PutSTDIN("my data")
obj.GetSTDOUT(6)
obj.GetSTDERR(6)
event = lldb.SBEvent()