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
14#include <optional>
15
16namespace lldb_private {
17
18class UserIDResolver;
19
21 friend class HostInfoBase;
22
23public:
24 static size_t GetPageSize();
25 static bool GetHostname(std::string &s);
26 static std::optional<std::string> GetOSKernelDescription();
27
28 static uint32_t GetUserID();
29 static uint32_t GetGroupID();
32
34
35 static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
36
38
39protected:
40 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
41 static bool ComputeHeaderDirectory(FileSpec &file_spec);
42};
43}
44
45#endif
A file utility class.
Definition: FileSpec.h:56
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
static bool GetHostname(std::string &s)
static std::optional< std::string > GetOSKernelDescription()
static FileSpec GetDefaultShell()
static uint32_t GetEffectiveUserID()
static bool GetEnvironmentVar(const std::string &var_name, std::string &var)
static uint32_t GetGroupID()
static uint32_t GetEffectiveGroupID()
static UserIDResolver & GetUserIDResolver()
static bool ComputeHeaderDirectory(FileSpec &file_spec)
An abstract interface for things that know how to map numeric user/group IDs into names.
A class that represents a running process on the host machine.