medismailben wrote: > @medismailben any ideas on how to add `std::optional<lldb.SBAddress>` support > to the Dispatch? It would be great if `handle_resolve_addr` could return > `lldb::SBAddress | None` and we would either fill in the optional value or if > we get None back we could return `std::nullopt`.
That's an interesting idea! We could specialize `Dispatch` return type to be `std::optional<T>` instead of `T` itself and "recursively" call the right `ExtractValueFromPythonObject<T>` specialization. I think that would be a good clean-up since we already have other specialization for optional types. Also, as most of the SB classes points to pointers (`SBDebugger` -> `DebuggerSP`, `SBTarget` -> `TargetSP`, `SBProcess` -> `ProcessWP`) we need to align on what to do for those types since wrapping them in an optional wouldn't bring much value IMO. https://github.com/llvm/llvm-project/pull/212831 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
