Pirama Arumuga Nainar | d285ad0 | 2022-02-08 09:26:56 -0800 | [diff] [blame] | 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 | |
| 9 | #ifndef LLDB_API_SBPROCESSINFO_H |
| 10 | #define LLDB_API_SBPROCESSINFO_H |
| 11 | |
| 12 | #include "lldb/API/SBDefines.h" |
| 13 | |
| 14 | namespace lldb { |
| 15 | |
| 16 | class LLDB_API SBProcessInfo { |
| 17 | public: |
| 18 | SBProcessInfo(); |
| 19 | SBProcessInfo(const SBProcessInfo &rhs); |
| 20 | |
| 21 | ~SBProcessInfo(); |
| 22 | |
| 23 | SBProcessInfo &operator=(const SBProcessInfo &rhs); |
| 24 | |
| 25 | explicit operator bool() const; |
| 26 | |
| 27 | bool IsValid() const; |
| 28 | |
| 29 | const char *GetName(); |
| 30 | |
| 31 | SBFileSpec GetExecutableFile(); |
| 32 | |
| 33 | lldb::pid_t GetProcessID(); |
| 34 | |
| 35 | uint32_t GetUserID(); |
| 36 | |
| 37 | uint32_t GetGroupID(); |
| 38 | |
| 39 | bool UserIDIsValid(); |
| 40 | |
| 41 | bool GroupIDIsValid(); |
| 42 | |
| 43 | uint32_t GetEffectiveUserID(); |
| 44 | |
| 45 | uint32_t GetEffectiveGroupID(); |
| 46 | |
| 47 | bool EffectiveUserIDIsValid(); |
| 48 | |
| 49 | bool EffectiveGroupIDIsValid(); |
| 50 | |
| 51 | lldb::pid_t GetParentProcessID(); |
| 52 | |
| 53 | /// Return the target triple (arch-vendor-os) for the described process. |
| 54 | const char *GetTriple(); |
| 55 | |
| 56 | private: |
| 57 | friend class SBProcess; |
| 58 | |
| 59 | lldb_private::ProcessInstanceInfo &ref(); |
| 60 | |
| 61 | void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref); |
| 62 | |
| 63 | std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_up; |
| 64 | }; |
| 65 | |
| 66 | } // namespace lldb |
| 67 | |
| 68 | #endif // LLDB_API_SBPROCESSINFO_H |