Enrico Granata | be93a35 | 2011-08-16 16:49:25 +0000 | [diff] [blame] | 1 | import sys |
| 2 | |
Enrico Granata | 223383e | 2011-08-16 23:24:13 +0000 | [diff] [blame^] | 3 | def welcome_impl(debugger, args, result, dict): |
| 4 | result.Printf('Hello ' + args + ', welcome to LLDB'); |
Enrico Granata | be93a35 | 2011-08-16 16:49:25 +0000 | [diff] [blame] | 5 | return None; |
| 6 | |
Enrico Granata | 223383e | 2011-08-16 23:24:13 +0000 | [diff] [blame^] | 7 | def target_name_impl(debugger, args, result, dict): |
Enrico Granata | be93a35 | 2011-08-16 16:49:25 +0000 | [diff] [blame] | 8 | target = debugger.GetSelectedTarget() |
| 9 | file = target.GetExecutable() |
Enrico Granata | 223383e | 2011-08-16 23:24:13 +0000 | [diff] [blame^] | 10 | result.PutCString('Current target ' + file.GetFilename()) |
Enrico Granata | be93a35 | 2011-08-16 16:49:25 +0000 | [diff] [blame] | 11 | if args == 'fail': |
| 12 | return 'a test for error in command' |
| 13 | else: |
Enrico Granata | 223383e | 2011-08-16 23:24:13 +0000 | [diff] [blame^] | 14 | return None |
| 15 | |
| 16 | def 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 |