5 class WelcomeCommand(object):
6 def __init__(self
, debugger
, session_dict
):
9 def get_short_help(self
):
11 "Just a docstring for welcome_impl\nA command that says hello to LLDB users"
14 def __call__(self
, debugger
, args
, exe_ctx
, result
):
15 print("Hello " + args
+ ", welcome to LLDB", file=result
)
19 class TargetnameCommand(object):
20 def __init__(self
, debugger
, session_dict
):
23 def __call__(self
, debugger
, args
, exe_ctx
, result
):
24 target
= debugger
.GetSelectedTarget()
25 file = target
.GetExecutable()
26 print("Current target " + file.GetFilename(), file=result
)
28 result
.SetError("a test for error in command")
31 return lldb
.eCommandRequiresTarget
34 def print_wait_impl(debugger
, args
, result
, dict):
35 result
.SetImmediateOutputFile(sys
.stdout
)
36 print("Trying to do long task..", file=result
)
40 print("Still doing long task..", file=result
)
42 print("Done; if you saw the delays I am doing OK", file=result
)
45 def check_for_synchro(debugger
, args
, result
, dict):
46 if debugger
.GetAsync():
47 print("I am running async", file=result
)
48 if debugger
.GetAsync() == False:
49 print("I am running sync", file=result
)
52 def takes_exe_ctx(debugger
, args
, exe_ctx
, result
, dict):
53 print(str(exe_ctx
.GetTarget()), file=result
)