Re: [lldb-dev] Stepping in a breakpoint callback with Python

2019-09-28 Thread Nikita Karetnikov via lldb-dev
Jim, > So the problem you are having is getting the scripted step started in "trace" > with the SBThread::StepUsingScriptedStep? Did you try passing False for > "resume_immediately" and then returning False from "trace". Yes, I did. In fact, I tried all these combinations: resume_immediately

Re: [lldb-dev] Stepping in a breakpoint callback with Python

2019-09-27 Thread Nikita Karetnikov via lldb-dev
Jim, > Does that simple use of the scripted plan also work for you? No, that doesn't work for me. My original script does more stuff, so I need to pass the state via global variables. However, I think I've figured out a way to do what I want:

Re: [lldb-dev] Stepping in a breakpoint callback with Python

2019-09-24 Thread Nikita Karetnikov via lldb-dev
Jim, >> Not sure if my current version of 'SimpleStep' is correct (I've made a few >> changes since testing via 'thread step-scripted'), but nothing happens (no >> prints on '__init__') when I add the class via 'StepUsingScriptedThreadPlan' in >> the callback. >> >> What's the proper way to do

Re: [lldb-dev] Stepping in a breakpoint callback with Python

2019-09-21 Thread Nikita Karetnikov via lldb-dev
Jim, > My model for this sort of tracing activity is that you are writing a fancy kind > of “step” operation. You would write a fancy step & record plan that would > proceed along however you wanted and log at each stop. Then your breakpoint > callback would just queue up this step-and-trace

[lldb-dev] Stepping in a breakpoint callback with Python

2019-09-18 Thread Nikita Karetnikov via lldb-dev
Hello, I'm trying to figure out how to write a simple tracer. Specifically, I want to perform some 'step's after a breakpoint callback fires. How do I do that in async mode? Here's my attempt: https://gist.github.com/nkaretnikov/6ee00afabf73332c5a89eacb610369c2 The problem is that pc is not