This patch extends the SBThreadPlan to allow retrieving of thread plans for scripted steps.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Presumably you are doing this so one scripted thread plan can use another one? This is the right way to do that, so this is great. Not sure why I didn't think of it.
BTW, looks like I added this without any tests. Totally my bad, this was a weekend experiment and was inert if not used, so I got the bits in and then wrote a bug on myself to write tests - demonstrating again why that's inadvisable...
If you are playing around with this and have a moment to formalize what you are doing into a test or two, I'd be grateful...
Thanks!
Yes, I've added this exactly to allow usage of a scripted plan from another scripted plan. Sure, I will add a test for this :) But I can't figure out how this part is tested, can you explain me this a little, please?
This should be easy to test with the python testsuite (lldbtest.) Start with the sample_test in packages/Python/lldbsuite/test - don't use the inline one, that won't be flexible enough. Then you can just make a scripted thread plan that just pushes a "step over" or "step in" plan, and step with it and make sure it landed where it should. Then to test your addition, make another scripted plan that calls your trivial stepping one, and make sure that stops where expected as well.