LLDB  mainline
PlatformNetBSD.h
Go to the documentation of this file.
1 //===-- PlatformNetBSD.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_NETBSD_PLATFORMNETBSD_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_NETBSD_PLATFORMNETBSD_H
11 
14 
15 namespace lldb_private {
16 namespace platform_netbsd {
17 
18 class PlatformNetBSD : public PlatformPOSIX {
19 public:
20  PlatformNetBSD(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-netbsd";
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 
50 
51  bool CanDebugProcess() override;
52 
53  void CalculateTrapHandlerSymbolNames() override;
54 
56  lldb::addr_t length, unsigned prot,
57  unsigned flags, lldb::addr_t fd,
58  lldb::addr_t offset) override;
59 
60  CompilerType GetSiginfoType(const llvm::Triple &triple) override;
61 
62  std::vector<ArchSpec> m_supported_architectures;
63 
64 private:
65  std::unique_ptr<TypeSystemClang> m_type_system_up;
66 };
67 
68 } // namespace platform_netbsd
69 } // namespace lldb_private
70 
71 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_NETBSD_PLATFORMNETBSD_H
lldb_private::platform_netbsd::PlatformNetBSD::CanDebugProcess
bool CanDebugProcess() override
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specifi...
Definition: PlatformNetBSD.cpp:180
lldb_private::platform_netbsd::PlatformNetBSD::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic(bool is_host)
Definition: PlatformNetBSD.cpp:69
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb_private::MmapArgList
llvm::SmallVector< lldb::addr_t, 6 > MmapArgList
Definition: Platform.h:58
lldb_private::platform_netbsd::PlatformNetBSD::m_supported_architectures
std::vector< ArchSpec > m_supported_architectures
Definition: PlatformNetBSD.h:62
lldb_private::platform_netbsd::PlatformNetBSD::CreateInstance
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch)
Definition: PlatformNetBSD.cpp:43
lldb_private::platform_netbsd::PlatformNetBSD::GetPluginName
llvm::StringRef GetPluginName() override
Definition: PlatformNetBSD.h:35
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::platform_netbsd::PlatformNetBSD::GetDescription
llvm::StringRef GetDescription() override
Definition: PlatformNetBSD.h:40
lldb_private::platform_netbsd::PlatformNetBSD
Definition: PlatformNetBSD.h:18
lldb_private::platform_netbsd::PlatformNetBSD::Initialize
static void Initialize()
Definition: PlatformNetBSD.cpp:75
PlatformPOSIX
Definition: PlatformPOSIX.h:18
lldb_private::platform_netbsd::PlatformNetBSD::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic(bool is_host)
Definition: PlatformNetBSD.h:29
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
TypeSystemClang.h
lldb_private::platform_netbsd::PlatformNetBSD::m_type_system_up
std::unique_ptr< TypeSystemClang > m_type_system_up
Definition: PlatformNetBSD.h:65
lldb_private::platform_netbsd::PlatformNetBSD::Terminate
static void Terminate()
Definition: PlatformNetBSD.cpp:91
lldb_private::platform_netbsd::PlatformNetBSD::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: PlatformNetBSD.cpp:119
lldb_private::platform_netbsd::PlatformNetBSD::CalculateTrapHandlerSymbolNames
void CalculateTrapHandlerSymbolNames() override
Ask the Platform subclass to fill in the list of trap handler names.
Definition: PlatformNetBSD.cpp:189
uint32_t
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private::platform_netbsd::PlatformNetBSD::GetStatus
void GetStatus(Stream &strm) override
Report the current status for this platform.
Definition: PlatformNetBSD.cpp:125
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::platform_netbsd::PlatformNetBSD::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: PlatformNetBSD.cpp:193
PlatformPOSIX.h
lldb_private::platform_netbsd::PlatformNetBSD::GetSiginfoType
CompilerType GetSiginfoType(const llvm::Triple &triple) override
Definition: PlatformNetBSD.cpp:208
lldb_private::platform_netbsd::PlatformNetBSD::GetResumeCountForLaunchInfo
uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override
Definition: PlatformNetBSD.cpp:146
lldb_private::Platform::IsHost
bool IsHost() const
Definition: Platform.h:420
lldb_private::platform_netbsd::PlatformNetBSD::PlatformNetBSD
PlatformNetBSD(bool is_host)
Default Constructor.
Definition: PlatformNetBSD.cpp:102
lldb_private::Platform::GetHostPlatformName
static const char * GetHostPlatformName()
Definition: Platform.cpp:61