forked from OSchip/llvm-project
Fixing Python commands test cases to work even after removing Printf
(and using the new syntax for printing :-) llvm-svn: 178389
This commit is contained in:
parent
3dfc33e3ac
commit
3a193f4b11
|
@ -1,6 +1,6 @@
|
|||
def bar_function(debugger, args, result, dict):
|
||||
global UtilityModule
|
||||
result.Printf(UtilityModule.barutil_function("bar told me " + args))
|
||||
print >>result, (UtilityModule.barutil_function("bar told me " + args))
|
||||
return None
|
||||
|
||||
def __lldb_init_module(debugger, session_dict):
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
def foo_function(debugger, args, result, dict):
|
||||
result.Printf("foobar says " + args)
|
||||
print >>result, ("foobar says " + args)
|
||||
return None
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
def foo_function(debugger, args, result, dict):
|
||||
result.Printf("foo says " + args)
|
||||
print >>result, ("foo says " + args)
|
||||
return None
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def foo2_function(debugger, args, result, dict):
|
||||
result.Printf("foo2 says " + args)
|
||||
print >>result, ("foo2 says " + args)
|
||||
return None
|
||||
|
||||
def __lldb_init_module(debugger, session_dict):
|
||||
|
|
|
@ -5,13 +5,13 @@ def welcome_impl(debugger, args, result, dict):
|
|||
Just a docstring for welcome_impl
|
||||
A command that says hello to LLDB users
|
||||
"""
|
||||
result.Printf('Hello ' + args + ', welcome to LLDB');
|
||||
print >>result, ('Hello ' + args + ', welcome to LLDB');
|
||||
return None;
|
||||
|
||||
def target_name_impl(debugger, args, result, dict):
|
||||
target = debugger.GetSelectedTarget()
|
||||
file = target.GetExecutable()
|
||||
result.PutCString('Current target ' + file.GetFilename())
|
||||
print >>result, ('Current target ' + file.GetFilename())
|
||||
if args == 'fail':
|
||||
return 'a test for error in command'
|
||||
else:
|
||||
|
@ -19,17 +19,17 @@ def target_name_impl(debugger, args, result, dict):
|
|||
|
||||
def print_wait_impl(debugger, args, result, dict):
|
||||
result.SetImmediateOutputFile(sys.stdout)
|
||||
result.PutCString('Trying to do long task..')
|
||||
print >>result, ('Trying to do long task..')
|
||||
import time
|
||||
time.sleep(1)
|
||||
result.PutCString('Still doing long task..')
|
||||
print >>result, ('Still doing long task..')
|
||||
time.sleep(1)
|
||||
result.PutCString('Done; if you saw the delays I am doing OK')
|
||||
print >>result, ('Done; if you saw the delays I am doing OK')
|
||||
return None
|
||||
|
||||
def check_for_synchro(debugger, args, result, dict):
|
||||
if debugger.GetAsync() == True:
|
||||
result.PutCString('I am running async')
|
||||
print >>result, ('I am running async')
|
||||
if debugger.GetAsync() == False:
|
||||
result.PutCString('I am running sync')
|
||||
print >>result, ('I am running sync')
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue