[Lldb-commits] [lldb] [lldb] Fix assert frame recognizer for Ubuntu 22.04 (PR #109594)

via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 25 10:39:55 PDT 2024


jimingham wrote:



> On Sep 25, 2024, at 10:33 AM, Jim Ingham ***@***.***> wrote:
> 
>> 
>> 
>> 
>>> On Sep 24, 2024, at 10:25 AM, Adrian Vogelsgesang ***@***.***> wrote:
>>> 
>>> 
>>> However, with these new "hiding frame" recognizers, we are using the frame hiding recognizers to handle "step out past hidden frames". So if - as was done in the original implementation - we're determining this during execution control, its hard to see how we can avoid running these recognizers all the time. That argues for not allowing unbounded backtracing in recognizers.
>>> 
>>> Good point, that's something which probably should be changed... CC @adrian-prantl <https://github.com/adrian-prantl>
>>> [...] So it would be better to make this an explicit gesture somehow.
>>> 
>>> StackFrameList::GetSelectedFrameIndex already takes a parameter select_most_relevant which enables the frame recognizers only for user-visible stops. At least from a cursory look over all its callers, it looks like what you are proposing?
>>> 
>> The execution control part of lldb doesn't care about selected frames, and doesn't ever call that API.  We're always just doing "GetStackFrameAtIndex".  I doubt it's going to be hard to make sure that never triggers running the recognizers, it may even do that already, I'd have to go back and check.
>> 
>> But if we're going to allow unbounded search recognizers, I think we do have to insist that they can't take part in execution control once it's running, though they certainly could augment a user level command like StepOut with further instructions (like step out to frame 7) before setting the ThreadPlan going.

Actually, this may not be as bad as that.  If the way to ask "make a RecognizedStackFrame for THIS FRAME and ask is the frame hidden" that is separate from "run the recognizer on all frames", then provided recognizing this frame is not too slow, the execution control could ask that safely when it stops.  We really only need to trigger the full stack scan when we calculate the Selected frame.  So these two parts of the functionality should be easy to cordon off from one another.

Jim

>> 
>> Jim
>>> (Not sure if I missed anything, though. Still new to the lldb code base...)
>>> 
>>>>>> Reply to this email directly, view it on GitHub <https://github.com/llvm/llvm-project/pull/109594#issuecomment-2371887865>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVW4EY62K4HB3HDOYWA3ZYGN7RAVCNFSM6AAAAABOU6Y2KKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZRHA4DOOBWGU>.
>>> You are receiving this because you were mentioned.
>>> 
>> 
>> 



https://github.com/llvm/llvm-project/pull/109594


More information about the lldb-commits mailing list