1 //===-- PlatformNetBSD.h ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_PlatformNetBSD_h_
11 #define liblldb_PlatformNetBSD_h_
13 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
15 namespace lldb_private {
16 namespace platform_netbsd {
18 class PlatformNetBSD : public PlatformPOSIX {
20 PlatformNetBSD(bool is_host);
22 ~PlatformNetBSD() override;
24 static void Initialize();
26 static void Terminate();
28 //------------------------------------------------------------
29 // lldb_private::PluginInterface functions
30 //------------------------------------------------------------
31 static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
33 static ConstString GetPluginNameStatic(bool is_host);
35 static const char *GetPluginDescriptionStatic(bool is_host);
37 ConstString GetPluginName() override;
39 uint32_t GetPluginVersion() override { return 1; }
41 //------------------------------------------------------------
42 // lldb_private::Platform functions
43 //------------------------------------------------------------
44 const char *GetDescription() override {
45 return GetPluginDescriptionStatic(IsHost());
48 void GetStatus(Stream &strm) override;
50 bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
52 int32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override;
54 bool CanDebugProcess() override;
56 lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
57 Debugger &debugger, Target *target,
58 Status &error) override;
60 void CalculateTrapHandlerSymbolNames() override;
62 uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
63 unsigned flags) override;
66 DISALLOW_COPY_AND_ASSIGN(PlatformNetBSD);
69 } // namespace platform_netbsd
70 } // namespace lldb_private
72 #endif // liblldb_PlatformNetBSD_h_