[Lldb-commits] [lldb] [lldb] Speed up evaluating breakpoint conditions by using DIL (PR #224740)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 18 15:59:22 PDT 2026
jimingham wrote:
> > BTW, one other tricky bit with conditions is that the parsed version of an expression might not be valid for all breakpoint locations. For instance if I have a bunch of overloaded function like:
> > struct a { int testme; char *fluff; };
> > struct b { double fluff; char testme; }
> > void foo(struct a input); void foo(struct b input);
> > I can do:
> > (lldb) break add name foo -c "input.testme == 0"
> > then the expression you cached for a stop at the "struct a" overload might be different from the one you would use stopping in the double overload. We should make sure the DIL version handles that as well.
>
> Hmm... Well, in this case it should be fine, as the MemberOfNode only stores the base and the member name, we resolve the types in the Evaluator. The only thing we look up in the parser is existing types, when we need to determine how to parse certain syntax, like the cast or sizeof, which could have a variable or a type in the parenthesis. In that case, yes, the tree could change. I'll have to think about it. Wouldn't it be the same problem for the UserExpression as well though?
No. In UserExpression, the only place ValueObjects enter the picture is the result ValueObject, which we require to be a scalar ValueObject so we can treat it as a bool. Otherwise all the parent->child relationships come directly from the native typesystem. That's why this is a new dependency on SCP's and the other details of ValueObject presentation.
https://github.com/llvm/llvm-project/pull/224740
More information about the lldb-commits
mailing list