LLDB mainline
SBProcessInfo.h
Go to the documentation of this file.
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
14namespace lldb {
15
17public:
19 SBProcessInfo(const SBProcessInfo &rhs);
20
22
24
25 explicit operator bool() const;
26
27 bool IsValid() const;
28
29 const char *GetName();
30
32
33 /// If the process was laumched with a first argument that doesn't match
34 /// the executable file or name, this will return a valid string.
35 const char *GetArg0();
36
38
39 uint32_t GetUserID();
40
41 uint32_t GetGroupID();
42
43 bool UserIDIsValid();
44
45 bool GroupIDIsValid();
46
47 uint32_t GetEffectiveUserID();
48
49 uint32_t GetEffectiveGroupID();
50
52
54
56
57 /// Return the target triple (arch-vendor-os) for the described process.
58 const char *GetTriple();
59
60 /// Returns the number of command line arguments for the described process.
61 uint32_t GetNumArguments() const;
62
63 /// Returns the command line argument at the given index, or `nullptr` if
64 /// the index is out of range or if the process info is invalid..
65 const char *GetArgumentAtIndex(uint32_t idx) const;
66
67private:
68 friend class SBProcess;
69 friend class SBProcessInfoList;
70
72
73 void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref);
74
75 std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_up;
76};
77
78} // namespace lldb
79
80#endif // LLDB_API_SBPROCESSINFO_H
#define LLDB_API
Definition SBDefines.h:28
static llvm::StringRef GetName(XcodeSDK::Type type)
Definition XcodeSDK.cpp:21
uint32_t GetNumArguments() const
Returns the number of command line arguments for the described process.
uint32_t GetEffectiveGroupID()
friend class SBProcess
const char * GetArgumentAtIndex(uint32_t idx) const
Returns the command line argument at the given index, or nullptr if the index is out of range or if t...
lldb::pid_t GetParentProcessID()
uint32_t GetEffectiveUserID()
SBProcessInfo & operator=(const SBProcessInfo &rhs)
std::unique_ptr< lldb_private::ProcessInstanceInfo > m_opaque_up
lldb_private::ProcessInstanceInfo & ref()
void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref)
friend class SBProcessInfoList
lldb::pid_t GetProcessID()
const char * GetTriple()
Return the target triple (arch-vendor-os) for the described process.
SBFileSpec GetExecutableFile()
const char * GetArg0()
If the process was laumched with a first argument that doesn't match the executable file or name,...
uint64_t pid_t
Definition lldb-types.h:83