• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import sys
2
3def welcome_impl(debugger, args, result, dict):
4    """
5        Just a docstring for welcome_impl
6        A command that says hello to LLDB users
7    """
8    print >>result,  ('Hello ' + args + ', welcome to LLDB');
9    return None;
10
11def target_name_impl(debugger, args, result, dict):
12    target = debugger.GetSelectedTarget()
13    file = target.GetExecutable()
14    print >>result,  ('Current target ' + file.GetFilename())
15    if args == 'fail':
16        result.SetError('a test for error in command')
17
18def print_wait_impl(debugger, args, result, dict):
19    result.SetImmediateOutputFile(sys.stdout)
20    print >>result,  ('Trying to do long task..')
21    import time
22    time.sleep(1)
23    print >>result,  ('Still doing long task..')
24    time.sleep(1)
25    print >>result,  ('Done; if you saw the delays I am doing OK')
26
27def check_for_synchro(debugger, args, result, dict):
28    if debugger.GetAsync() == True:
29        print >>result,  ('I am running async')
30    if debugger.GetAsync() == False:
31        print >>result,  ('I am running sync')
32
33