blob: db90e89ee4e0c710cec2690c4db00bf99902c5cb [file] [log] [blame]
Enrico Granatabe93a352011-08-16 16:49:25 +00001import sys
2
Enrico Granata223383e2011-08-16 23:24:13 +00003def welcome_impl(debugger, args, result, dict):
4 result.Printf('Hello ' + args + ', welcome to LLDB');
Enrico Granatabe93a352011-08-16 16:49:25 +00005 return None;
6
Enrico Granata223383e2011-08-16 23:24:13 +00007def target_name_impl(debugger, args, result, dict):
Enrico Granatabe93a352011-08-16 16:49:25 +00008 target = debugger.GetSelectedTarget()
9 file = target.GetExecutable()
Enrico Granata223383e2011-08-16 23:24:13 +000010 result.PutCString('Current target ' + file.GetFilename())
Enrico Granatabe93a352011-08-16 16:49:25 +000011 if args == 'fail':
12 return 'a test for error in command'
13 else:
Enrico Granata223383e2011-08-16 23:24:13 +000014 return None
15
16def print_wait_impl(debugger, args, result, dict):
17 print 'Trying to do long task..';
18 import time
19 time.sleep(1)
20 print 'Still doing long task..';
21 time.sleep(1)
22 result.PutCString('Done; if you saw the delays I am doing OK')
23 return None