[libc++] Remove duplicated _LIBCPP_HIDE_FROM_ABI from a few declarations (#122323)
[llvm-project.git] / lldb / test / API / commands / command / script / welcome.py
blob7b7578d6df46d487d91e8eb9b7aa90b13c44ab33
1 import lldb
2 import sys
5 class WelcomeCommand(object):
6 def __init__(self, debugger, session_dict):
7 pass
9 def get_short_help(self):
10 return (
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)
16 return None
19 class TargetnameCommand(object):
20 def __init__(self, debugger, session_dict):
21 pass
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)
27 if args == "fail":
28 result.SetError("a test for error in command")
30 def get_flags(self):
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)
37 import time
39 time.sleep(1)
40 print("Still doing long task..", file=result)
41 time.sleep(1)
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 not debugger.GetAsync():
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)