]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
MFV r331708:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Platform / FreeBSD / PlatformFreeBSD.h
1 //===-- PlatformFreeBSD.h ---------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_PlatformFreeBSD_h_
11 #define liblldb_PlatformFreeBSD_h_
12
13 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
14
15 namespace lldb_private {
16 namespace platform_freebsd {
17
18 class PlatformFreeBSD : public PlatformPOSIX {
19 public:
20   PlatformFreeBSD(bool is_host);
21
22   ~PlatformFreeBSD() override;
23
24   static void Initialize();
25
26   static void Terminate();
27
28   //------------------------------------------------------------
29   // lldb_private::PluginInterface functions
30   //------------------------------------------------------------
31   static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
32
33   static ConstString GetPluginNameStatic(bool is_host);
34
35   static const char *GetPluginDescriptionStatic(bool is_host);
36
37   ConstString GetPluginName() override;
38
39   uint32_t GetPluginVersion() override { return 1; }
40
41   //------------------------------------------------------------
42   // lldb_private::Platform functions
43   //------------------------------------------------------------
44   const char *GetDescription() override {
45     return GetPluginDescriptionStatic(IsHost());
46   }
47
48   void GetStatus(Stream &strm) override;
49
50   bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
51
52   bool CanDebugProcess() override;
53
54   size_t GetSoftwareBreakpointTrapOpcode(Target &target,
55                                          BreakpointSite *bp_site) override;
56
57   Status LaunchProcess(ProcessLaunchInfo &launch_info) override;
58
59   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
60                          Target *target, Status &error) override;
61
62   void CalculateTrapHandlerSymbolNames() override;
63
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;
68
69 private:
70   DISALLOW_COPY_AND_ASSIGN(PlatformFreeBSD);
71 };
72
73 } // namespace platform_freebsd
74 } // namespace lldb_private
75
76 #endif // liblldb_PlatformFreeBSD_h_