]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Host/linux/HostInfoLinux.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Host / linux / HostInfoLinux.h
1 //===-- HostInfoLinux.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef lldb_Host_linux_HostInfoLinux_h_
11 #define lldb_Host_linux_HostInfoLinux_h_
12
13 #include "lldb/Host/FileSpec.h"
14 #include "lldb/Host/posix/HostInfoPosix.h"
15
16 #include "llvm/ADT/StringRef.h"
17
18 #include <string>
19
20 namespace lldb_private {
21
22 class HostInfoLinux : public HostInfoPosix {
23   friend class HostInfoBase;
24
25 private:
26   // Static class, unconstructable.
27   HostInfoLinux();
28   ~HostInfoLinux();
29
30 public:
31   static void Initialize();
32   static uint32_t GetMaxThreadNameLength();
33
34   static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
35   static bool GetOSBuildString(std::string &s);
36   static bool GetOSKernelDescription(std::string &s);
37   static llvm::StringRef GetDistributionId();
38   static FileSpec GetProgramFileSpec();
39
40 protected:
41   static bool ComputeSupportExeDirectory(FileSpec &file_spec);
42   static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
43   static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
44   static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
45                                              ArchSpec &arch_64);
46 };
47 }
48
49 #endif