Jim Ingham | a697626 | 2017-10-05 00:49:49 +0000 | [diff] [blame] | 1 | """ Does a step-over then prints the local variables or only the ones passed in """ |
| 2 | import lldb |
| 3 | |
| 4 | class StepAndPrint: |
| 5 | def __init__(self, debugger, unused): |
| 6 | return |
| 7 | |
| 8 | def __call__(self, debugger, command, exe_ctx, result): |
| 9 | # Set the command to synchronous so the step will complete |
| 10 | # before we try to run the frame variable. |
| 11 | old_async = debugger.GetAsync() |
| 12 | debugger.SetAsync(False) |
| 13 | |
| 14 | debugger.HandleCommand("thread step-over") |
| 15 | print("---------- Values: -------------------\n") |
| 16 | debugger.HandleCommand("frame variable %s"%(command)) |
| 17 | |
| 18 | debugger.SetAsync(old_async) |
| 19 | |
| 20 | def get_short_help(self): |
| 21 | return "Does a step-over then runs frame variable passing the command args to it\n" |
| 22 | |
| 23 | def __lldb_init_module(debugger, unused): |
| 24 | debugger.HandleCommand("command script add -c step_and_print.StepAndPrint sap") |