mentlerd wrote:

> A high-level comment: could we split up `FindLibCppStdFunctionCallableInfo`? 
> Exactly how I haven't fully thought through. But possibly a function for each 
> of the callable cases?

Sure! I think a natural split could be to make a version which returns a 
(possibly dummy) `ValueObjectSP` of wrapped callable in combination with a 
`CompilerType` of the function pointer type describing the kind of function 
this `std::function` implements.

Other code then can either proceed to extracting the load address from the 
`ValueObjectSP` that we might land in when the `std::function` is called, or to 
just serve the `ValueObjectSP` as synthetic children.

---

One open question that I have been thinking about is how to handle callable 
types with multiple `operator()(...)` function overloads. My thought process so 
far is that trying to figure out which overload `std::function` would end up 
calling is futile effort, instead we could try giving the thread plan all 
potential addresses.

https://github.com/llvm/llvm-project/pull/111892
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to