LLDB  mainline
HostInfoLinux.h
Go to the documentation of this file.
1 //===-- HostInfoLinux.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_linux_HostInfoLinux_h_
10 #define lldb_Host_linux_HostInfoLinux_h_
11 
13 #include "lldb/Utility/FileSpec.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/VersionTuple.h"
16 
17 #include <string>
18 
19 namespace lldb_private {
20 
21 class HostInfoLinux : public HostInfoPosix {
22  friend class HostInfoBase;
23 
24 public:
25  static void Initialize(SharedLibraryDirectoryHelper *helper = nullptr);
26  static void Terminate();
27 
28  static llvm::VersionTuple GetOSVersion();
29  static bool GetOSBuildString(std::string &s);
30  static bool GetOSKernelDescription(std::string &s);
31  static llvm::StringRef GetDistributionId();
33 
34 protected:
35  static bool ComputeSupportExeDirectory(FileSpec &file_spec);
36  static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
37  static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
38  static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
39  ArchSpec &arch_64);
40 };
41 }
42 
43 #endif
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::HostInfoLinux::ComputeHostArchitectureSupport
static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
Definition: HostInfoLinux.cpp:214
HostInfoPosix.h
lldb_private::HostInfoPosix
Definition: HostInfoPosix.h:19
lldb_private::HostInfoLinux::Terminate
static void Terminate()
Definition: HostInfoLinux.cpp:44
lldb_private::HostInfoLinux::ComputeSystemPluginsDirectory
static bool ComputeSystemPluginsDirectory(FileSpec &file_spec)
Definition: HostInfoLinux.cpp:193
lldb_private::HostInfoBase::SharedLibraryDirectoryHelper
void(FileSpec &this_file) SharedLibraryDirectoryHelper
A helper function for determining the liblldb location.
Definition: HostInfoBase.h:44
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::HostInfoLinux::Initialize
static void Initialize(SharedLibraryDirectoryHelper *helper=nullptr)
Definition: HostInfoLinux.cpp:38
lldb_private::HostInfoLinux::GetDistributionId
static llvm::StringRef GetDistributionId()
Definition: HostInfoLinux.cpp:93
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::HostInfoBase
Definition: HostInfoBase.h:33
lldb_private::HostInfoLinux::GetProgramFileSpec
static FileSpec GetProgramFileSpec()
Definition: HostInfoLinux.cpp:170
lldb_private::HostInfoLinux::GetOSBuildString
static bool GetOSBuildString(std::string &s)
Definition: HostInfoLinux.cpp:68
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::HostInfoLinux
Definition: HostInfoLinux.h:21
lldb_private::HostInfoLinux::GetOSVersion
static llvm::VersionTuple GetOSVersion()
Definition: HostInfoLinux.cpp:51
FileSpec.h
lldb_private::HostInfoLinux::ComputeUserPluginsDirectory
static bool ComputeUserPluginsDirectory(FileSpec &file_spec)
Definition: HostInfoLinux.cpp:200
lldb_private::HostInfoLinux::ComputeSupportExeDirectory
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
Definition: HostInfoLinux.cpp:185
lldb_private::HostInfoLinux::GetOSKernelDescription
static bool GetOSKernelDescription(std::string &s)
Definition: HostInfoLinux.cpp:80