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
A class that represents a running process on the host machine.
static FileSpec GetDefaultShell()
A file utility class.
Definition: FileSpec.h:56
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
static bool GetHostname(std::string &s)
static bool ComputeHeaderDirectory(FileSpec &file_spec)
static bool GetEnvironmentVar(const std::string &var_name, std::string &var)
static uint32_t GetEffectiveUserID()
static uint32_t GetGroupID()
An abstract interface for things that know how to map numeric user/group IDs into names...
static uint32_t GetEffectiveGroupID()
static UserIDResolver & GetUserIDResolver()