LLDB  mainline
HostInfoPosix.h
Go to the documentation of this file.
1 //===-- HostInfoPosix.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_HOST_POSIX_HOSTINFOPOSIX_H
10 #define LLDB_HOST_POSIX_HOSTINFOPOSIX_H
11 
12 #include "lldb/Host/HostInfoBase.h"
13 #include "lldb/Utility/FileSpec.h"
14 
15 namespace lldb_private {
16 
17 class UserIDResolver;
18 
19 class HostInfoPosix : public HostInfoBase {
20  friend class HostInfoBase;
21 
22 public:
23  static size_t GetPageSize();
24  static bool GetHostname(std::string &s);
25 
26  static uint32_t GetUserID();
27  static uint32_t GetGroupID();
30 
31  static FileSpec GetDefaultShell();
32 
33  static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
34 
36 
37 protected:
38  static bool ComputeSupportExeDirectory(FileSpec &file_spec);
39  static bool ComputeHeaderDirectory(FileSpec &file_spec);
40 };
41 }
42 
43 #endif
lldb_private::HostInfoPosix
Definition: HostInfoPosix.h:19
lldb_private::HostInfoPosix::GetEnvironmentVar
static bool GetEnvironmentVar(const std::string &var_name, std::string &var)
Definition: HostInfoPosix.cpp:142
lldb_private::HostInfoPosix::ComputeSupportExeDirectory
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
Definition: HostInfoPosix.cpp:132
lldb_private::HostInfoPosix::ComputeHeaderDirectory
static bool ComputeHeaderDirectory(FileSpec &file_spec)
Definition: HostInfoPosix.cpp:136
lldb_private::HostInfoPosix::GetHostname
static bool GetHostname(std::string &s)
Definition: HostInfoPosix.cpp:30
lldb_private::HostInfoPosix::GetEffectiveGroupID
static uint32_t GetEffectiveGroupID()
Definition: HostInfoPosix.cpp:122
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::HostInfoPosix::GetEffectiveUserID
static uint32_t GetEffectiveUserID()
Definition: HostInfoPosix.cpp:120
HostInfoBase.h
lldb_private::HostInfoPosix::GetDefaultShell
static FileSpec GetDefaultShell()
Definition: HostInfoPosix.cpp:124
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::UserIDResolver
An abstract interface for things that know how to map numeric user/group IDs into names.
Definition: UserIDResolver.h:22
lldb_private::HostInfoPosix::GetGroupID
static uint32_t GetGroupID()
Definition: HostInfoPosix.cpp:118
lldb_private::HostInfoPosix::GetUserID
static uint32_t GetUserID()
Definition: HostInfoPosix.cpp:116
uint32_t
lldb_private::HostInfoBase
Definition: HostInfoBase.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::HostInfoPosix::GetUserIDResolver
static UserIDResolver & GetUserIDResolver()
Definition: HostInfoPosix.cpp:112
FileSpec.h
lldb_private::HostInfoPosix::GetPageSize
static size_t GetPageSize()
Definition: HostInfoPosix.cpp:28