1 //===-- PlatformFreeBSD.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_PlatformFreeBSD_h_
11 #define liblldb_PlatformFreeBSD_h_
13 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
15 namespace lldb_private {
16 namespace platform_freebsd {
18 class PlatformFreeBSD : public PlatformPOSIX {
20 PlatformFreeBSD(bool is_host);
22 ~PlatformFreeBSD() 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 bool CanDebugProcess() override;
54 size_t GetSoftwareBreakpointTrapOpcode(Target &target,
55 BreakpointSite *bp_site) override;
57 Status LaunchProcess(ProcessLaunchInfo &launch_info) override;
59 lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
60 Target *target, Status &error) override;
62 void CalculateTrapHandlerSymbolNames() override;
64 MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
65 lldb::addr_t length, unsigned prot,
66 unsigned flags, lldb::addr_t fd,
67 lldb::addr_t offset) override;
70 DISALLOW_COPY_AND_ASSIGN(PlatformFreeBSD);
73 } // namespace platform_freebsd
74 } // namespace lldb_private
76 #endif // liblldb_PlatformFreeBSD_h_