Implement SBProcessInfo to wrap lldb_private::ProcessInstanceInfo, and add SBProcess::GetProcessInfo() to retrieve info like parent ID, group ID, user ID etc. from a live process.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This is a useful addition. I don't have a problem with it going in as is.
It is unfortunate that we don't have an LLDB_INVALID_{USER,GROUP}_ID we could use to tell us whether the ID was invalid. We're doing that internally anyway - where UINT32_MAX stands in for the definition. I guess you could argue that it allows us the flexibility to make what the invalid process ID is vary with platform, but we use a define and not an IsValid for ProcessID/LLDB_INVALID_PROCESS_ID so we aren't consistently asserting a general principle that we can divorce the validity of this sort of option from its value.
Presumably you were just following the precedent set by the SBAttachInfo class, so I don't think it's worth holding up this good change to fix that issue, however.