Index: examples/python/process_events.py =================================================================== --- examples/python/process_events.py +++ examples/python/process_events.py @@ -184,6 +184,12 @@ help='Specify the timeout in seconds to wait for process state change events.', default=lldb.UINT32_MAX) parser.add_option( + '-f', + '--trace-function', + type='string', + dest='trace_function', + help='Trace a function during execution, Warning: tracing is really slow.') + parser.add_option( '-e', '--environment', action='append', @@ -275,6 +281,9 @@ for bp in options.breakpoints: debugger.HandleCommand("_regexp-break %s" % (bp)) run_commands(command_interpreter, ['breakpoint list']) + if launch_info and options.trace_function: + debugger.HandleCommand("_regexp-break &%s" % (options.trace_function)) + run_commands(command_interpreter, ['breakpoint list']) for run_idx in range(options.run_count): # Launch the process. Since we specified synchronous mode, we won't return @@ -348,7 +357,10 @@ stop_idx += 1 print_threads(process, options) print "continuing process %u" % (pid) - process.Continue() + if options.trace_function: + process.GetThreadAtIndex(0).StepInto() + else: + process.Continue() elif state == lldb.eStateExited: exit_desc = process.GetExitDescription() if exit_desc: