1 //===-- PlatformNetBSD.h ----------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_PlatformNetBSD_h_
10 #define liblldb_PlatformNetBSD_h_
12 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
14 namespace lldb_private {
15 namespace platform_netbsd {
17 class PlatformNetBSD : public PlatformPOSIX {
19 PlatformNetBSD(bool is_host);
21 ~PlatformNetBSD() override;
23 static void Initialize();
25 static void Terminate();
27 // lldb_private::PluginInterface functions
28 static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
30 static ConstString GetPluginNameStatic(bool is_host);
32 static const char *GetPluginDescriptionStatic(bool is_host);
34 ConstString GetPluginName() override;
36 uint32_t GetPluginVersion() override { return 1; }
38 // lldb_private::Platform functions
39 const char *GetDescription() override {
40 return GetPluginDescriptionStatic(IsHost());
43 void GetStatus(Stream &strm) override;
45 bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
47 int32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override;
49 bool CanDebugProcess() override;
51 lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
52 Debugger &debugger, Target *target,
53 Status &error) override;
55 void CalculateTrapHandlerSymbolNames() override;
57 MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
58 lldb::addr_t length, unsigned prot,
59 unsigned flags, lldb::addr_t fd,
60 lldb::addr_t offset) override;
63 DISALLOW_COPY_AND_ASSIGN(PlatformNetBSD);
66 } // namespace platform_netbsd
67 } // namespace lldb_private
69 #endif // liblldb_PlatformNetBSD_h_