Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

Expose process instance info via SB API

Authored by enlight on Jul 26 2017, 2:09 AM.



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.

Diff Detail


Event Timeline

enlight created this revision.Jul 26 2017, 2:09 AM
jingham accepted this revision.Jul 26 2017, 5:27 PM
jingham added a subscriber: jingham.

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.

This revision is now accepted and ready to land.Jul 26 2017, 5:27 PM
This revision was automatically updated to reflect the committed changes.