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#include <optional>
15
16namespace lldb_private {
17
18class UserIDResolver;
19
20class HostInfoPosix : public HostInfoBase {
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();
30 static uint32_t GetEffectiveUserID();
31 static uint32_t GetEffectiveGroupID();
32
33 static FileSpec GetDefaultShell();
34
35 static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
36
37 static UserIDResolver &GetUserIDResolver();
38
39protected:
40 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
41 static bool ComputeHeaderDirectory(FileSpec &file_spec);
42};
43}
44
45#endif
46

source code of lldb/include/lldb/Host/posix/HostInfoPosix.h