Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:48

0001 //===-- HostInfoPosix.h -----------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_HOST_POSIX_HOSTINFOPOSIX_H
0010 #define LLDB_HOST_POSIX_HOSTINFOPOSIX_H
0011 
0012 #include "lldb/Host/HostInfoBase.h"
0013 #include "lldb/Utility/FileSpec.h"
0014 #include <optional>
0015 #include <string>
0016 
0017 namespace lldb_private {
0018 
0019 class UserIDResolver;
0020 
0021 class HostInfoPosix : public HostInfoBase {
0022   friend class HostInfoBase;
0023 
0024 public:
0025   static size_t GetPageSize();
0026   static bool GetHostname(std::string &s);
0027   static std::optional<std::string> GetOSKernelDescription();
0028 
0029   static uint32_t GetUserID();
0030   static uint32_t GetGroupID();
0031   static uint32_t GetEffectiveUserID();
0032   static uint32_t GetEffectiveGroupID();
0033 
0034   static FileSpec GetDefaultShell();
0035 
0036   static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
0037 
0038   static UserIDResolver &GetUserIDResolver();
0039   static llvm::VersionTuple GetOSVersion();
0040   static std::optional<std::string> GetOSBuildString();
0041 
0042 protected:
0043   static bool ComputeSupportExeDirectory(FileSpec &file_spec);
0044   static bool ComputeHeaderDirectory(FileSpec &file_spec);
0045   static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
0046   static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
0047 };
0048 } // namespace lldb_private
0049 
0050 #endif