[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)
Fred Grim via lldb-commits
lldb-commits at lists.llvm.org
Mon May 13 09:46:22 PDT 2024
================
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo {
ProcessInstanceInfo() = default;
ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid)
- : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX),
- m_parent_pid(LLDB_INVALID_PROCESS_ID) {}
+ : ProcessInfo(name, arch, pid) {}
void Clear() {
ProcessInfo::Clear();
- m_euid = UINT32_MAX;
- m_egid = UINT32_MAX;
- m_parent_pid = LLDB_INVALID_PROCESS_ID;
+ m_euid = std::nullopt;
+ m_egid = std::nullopt;
+ m_parent_pid = std::nullopt;
}
- uint32_t GetEffectiveUserID() const { return m_euid; }
+ uint32_t GetEffectiveUserID() const { return m_euid.value(); }
----------------
feg208 wrote:
Maybe a better approach is to keep the optionals in the members that are particular to ProcessInstanceInfo (i.e. the time fields, priority, and the zombie fields) and revert the pid fields and the pid and uid/gid fields to the previous and punt that to a later pr. How does that sound?
https://github.com/llvm/llvm-project/pull/91544
More information about the lldb-commits
mailing list