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 
13 
14 namespace lldb_private {
15 namespace platform_freebsd {
16 
18 public:
19  PlatformFreeBSD(bool is_host);
20 
21  static void Initialize();
22 
23  static void Terminate();
24 
25  // lldb_private::PluginInterface functions
26  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
27 
28  static llvm::StringRef GetPluginNameStatic(bool is_host) {
29  return is_host ? Platform::GetHostPlatformName() : "remote-freebsd";
30  }
31 
32  static llvm::StringRef GetPluginDescriptionStatic(bool is_host);
33 
34  llvm::StringRef GetPluginName() override {
35  return GetPluginNameStatic(IsHost());
36  }
37 
38  // lldb_private::Platform functions
39  llvm::StringRef GetDescription() override {
41  }
42 
43  void GetStatus(Stream &strm) override;
44 
45  std::vector<ArchSpec> GetSupportedArchitectures() override;
46 
47  bool CanDebugProcess() override;
48 
49  void CalculateTrapHandlerSymbolNames() override;
50 
52  lldb::addr_t length, unsigned prot,
53  unsigned flags, lldb::addr_t fd,
54  lldb::addr_t offset) override;
55 
56  std::vector<ArchSpec> m_supported_architectures;
57 };
58 
59 } // namespace platform_freebsd
60 } // namespace lldb_private
61 
62 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::MmapArgList
llvm::SmallVector< lldb::addr_t, 6 > MmapArgList
Definition: Platform.h:58
lldb_private::platform_freebsd::PlatformFreeBSD
Definition: PlatformFreeBSD.h:17
lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginName
llvm::StringRef GetPluginName() override
Definition: PlatformFreeBSD.h:34
lldb_private::platform_freebsd::PlatformFreeBSD::GetStatus
void GetStatus(Stream &strm) override
Report the current status for this platform.
Definition: PlatformFreeBSD.cpp:137
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:166
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:157
lldb_private::platform_freebsd::PlatformFreeBSD::GetDescription
llvm::StringRef GetDescription() override
Definition: PlatformFreeBSD.h:39
lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch)
Definition: PlatformFreeBSD.cpp:47
PlatformPOSIX
Definition: PlatformPOSIX.h:18
lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic(bool is_host)
Definition: PlatformFreeBSD.h:28
lldb_private::platform_freebsd::PlatformFreeBSD::m_supported_architectures
std::vector< ArchSpec > m_supported_architectures
Definition: PlatformFreeBSD.h:56
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:170
lldb_private::platform_freebsd::PlatformFreeBSD::Initialize
static void Initialize()
Definition: PlatformFreeBSD.cpp:85
lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectures
std::vector< ArchSpec > GetSupportedArchitectures() override
Get the platform's supported architectures in the order in which they should be searched.
Definition: PlatformFreeBSD.cpp:131
lldb_private::platform_freebsd::PlatformFreeBSD::PlatformFreeBSD
PlatformFreeBSD(bool is_host)
Default Constructor.
Definition: PlatformFreeBSD.cpp:112
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:79
PlatformPOSIX.h
lldb_private::Platform::IsHost
bool IsHost() const
Definition: Platform.h:423
lldb_private::Platform::GetHostPlatformName
static const char * GetHostPlatformName()
Definition: Platform.cpp:60
lldb_private::platform_freebsd::PlatformFreeBSD::Terminate
static void Terminate()
Definition: PlatformFreeBSD.cpp:101