[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon May 20 16:18:03 PDT 2024


https://github.com/clayborg requested changes to this pull request.

We should either truly use `std::optional` and return `std::optional<T>` for all getters, or just not use them. This patch adds a `bool IsZombieValid()` which the user must know to call prior to calling `bool IsZombie()`, which is just a crash waiting to happen. So lets either use `std::optional` correclty, or remove it and use sane default values. I like the idea of using `std::optional` and suggested ways to provide default values with the `value_or(T)` calls clients can easily use.

So might suggest to revert any `struct timespec` optionals since we aren't using them at all, and use `std::optional` and return `std::optional` from the getter functions and have the clients use `value_or(T)` just for these two new functions.

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


More information about the lldb-commits mailing list