LLDB  mainline
PlatformFreeBSD.h
Go to the documentation of this file.
1 //===-- PlatformFreeBSD.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_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H
11 
14 
15 namespace lldb_private {
16 namespace platform_freebsd {
17 
19 public:
20  PlatformFreeBSD(bool is_host);
21 
22  static void Initialize();
23 
24  static void Terminate();
25 
26  // lldb_private::PluginInterface functions
27  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
28 
29  static llvm::StringRef GetPluginNameStatic(bool is_host) {
30  return is_host ? Platform::GetHostPlatformName() : "remote-freebsd";
31  }
32 
33  static llvm::StringRef GetPluginDescriptionStatic(bool is_host);
34 
35  llvm::StringRef GetPluginName() override {
36  return GetPluginNameStatic(IsHost());
37  }
38 
39  // lldb_private::Platform functions
40  llvm::StringRef GetDescription() override {
42  }
43 
44  void GetStatus(Stream &strm) override;
45 
46  std::vector<ArchSpec>
47  GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
48 
49  bool CanDebugProcess() override;
50 
51  void CalculateTrapHandlerSymbolNames() override;
52 
54  lldb::addr_t length, unsigned prot,
55  unsigned flags, lldb::addr_t fd,
56  lldb::addr_t offset) override;
57 
58  CompilerType GetSiginfoType(const llvm::Triple &triple) override;
59 
60  std::vector<ArchSpec> m_supported_architectures;
61 
62 private:
63  std::unique_ptr<TypeSystemClang> m_type_system_up;
64 };
65 
66 } // namespace platform_freebsd
67 } // namespace lldb_private
68 
69 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb_private::MmapArgList
llvm::SmallVector< lldb::addr_t, 6 > MmapArgList
Definition: Platform.h:58
lldb_private::platform_freebsd::PlatformFreeBSD
Definition: PlatformFreeBSD.h:18
lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginName
llvm::StringRef GetPluginName() override
Definition: PlatformFreeBSD.h:35
lldb_private::platform_freebsd::PlatformFreeBSD::GetStatus
void GetStatus(Stream &strm) override
Report the current status for this platform.
Definition: PlatformFreeBSD.cpp:139
lldb_private::platform_freebsd::PlatformFreeBSD::CalculateTrapHandlerSymbolNames
void CalculateTrapHandlerSymbolNames() override
Ask the Platform subclass to fill in the list of trap handler names.
Definition: PlatformFreeBSD.cpp:168
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::platform_freebsd::PlatformFreeBSD::CanDebugProcess
bool CanDebugProcess() override
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specifi...
Definition: PlatformFreeBSD.cpp:159
lldb_private::platform_freebsd::PlatformFreeBSD::GetDescription
llvm::StringRef GetDescription() override
Definition: PlatformFreeBSD.h:40
lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch)
Definition: PlatformFreeBSD.cpp:48
PlatformPOSIX
Definition: PlatformPOSIX.h:18
TypeSystemClang.h
lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic(bool is_host)
Definition: PlatformFreeBSD.h:29
lldb_private::platform_freebsd::PlatformFreeBSD::m_type_system_up
std::unique_ptr< TypeSystemClang > m_type_system_up
Definition: PlatformFreeBSD.h:63
lldb_private::platform_freebsd::PlatformFreeBSD::m_supported_architectures
std::vector< ArchSpec > m_supported_architectures
Definition: PlatformFreeBSD.h:60
lldb_private::platform_freebsd::PlatformFreeBSD::GetMmapArgumentList
MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, lldb::addr_t length, unsigned prot, unsigned flags, lldb::addr_t fd, lldb::addr_t offset) override
Definition: PlatformFreeBSD.cpp:172
lldb_private::platform_freebsd::PlatformFreeBSD::Initialize
static void Initialize()
Definition: PlatformFreeBSD.cpp:86
lldb_private::platform_freebsd::PlatformFreeBSD::GetSiginfoType
CompilerType GetSiginfoType(const llvm::Triple &triple) override
Definition: PlatformFreeBSD.cpp:189
lldb_private::platform_freebsd::PlatformFreeBSD::PlatformFreeBSD
PlatformFreeBSD(bool is_host)
Default Constructor.
Definition: PlatformFreeBSD.cpp:113
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic(bool is_host)
Definition: PlatformFreeBSD.cpp:80
PlatformPOSIX.h
lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectures
std::vector< ArchSpec > GetSupportedArchitectures(const ArchSpec &process_host_arch) override
Get the platform's supported architectures in the order in which they should be searched.
Definition: PlatformFreeBSD.cpp:133
lldb_private::Platform::IsHost
bool IsHost() const
Definition: Platform.h:420
lldb_private::Platform::GetHostPlatformName
static const char * GetHostPlatformName()
Definition: Platform.cpp:61
lldb_private::platform_freebsd::PlatformFreeBSD::Terminate
static void Terminate()
Definition: PlatformFreeBSD.cpp:102