SBProcessInfo.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //===-- SBProcessInfo.h -----------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLDB_API_SBPROCESSINFO_H
  9. #define LLDB_API_SBPROCESSINFO_H
  10. #include "lldb/API/SBDefines.h"
  11. namespace lldb {
  12. class LLDB_API SBProcessInfo {
  13. public:
  14. SBProcessInfo();
  15. SBProcessInfo(const SBProcessInfo &rhs);
  16. ~SBProcessInfo();
  17. SBProcessInfo &operator=(const SBProcessInfo &rhs);
  18. explicit operator bool() const;
  19. bool IsValid() const;
  20. const char *GetName();
  21. SBFileSpec GetExecutableFile();
  22. lldb::pid_t GetProcessID();
  23. uint32_t GetUserID();
  24. uint32_t GetGroupID();
  25. bool UserIDIsValid();
  26. bool GroupIDIsValid();
  27. uint32_t GetEffectiveUserID();
  28. uint32_t GetEffectiveGroupID();
  29. bool EffectiveUserIDIsValid();
  30. bool EffectiveGroupIDIsValid();
  31. lldb::pid_t GetParentProcessID();
  32. private:
  33. friend class SBProcess;
  34. lldb_private::ProcessInstanceInfo &ref();
  35. void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref);
  36. std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_up;
  37. };
  38. } // namespace lldb
  39. #endif // LLDB_API_SBPROCESSINFO_H