]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Platform / FreeBSD / PlatformFreeBSD.h
1 //===-- PlatformFreeBSD.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 liblldb_PlatformFreeBSD_h_
10 #define liblldb_PlatformFreeBSD_h_
11
12 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
13
14 namespace lldb_private {
15 namespace platform_freebsd {
16
17 class PlatformFreeBSD : public PlatformPOSIX {
18 public:
19   PlatformFreeBSD(bool is_host);
20
21   ~PlatformFreeBSD() override;
22
23   static void Initialize();
24
25   static void Terminate();
26
27   // lldb_private::PluginInterface functions
28   static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
29
30   static ConstString GetPluginNameStatic(bool is_host);
31
32   static const char *GetPluginDescriptionStatic(bool is_host);
33
34   ConstString GetPluginName() override;
35
36   uint32_t GetPluginVersion() override { return 1; }
37
38   // lldb_private::Platform functions
39   const char *GetDescription() override {
40     return GetPluginDescriptionStatic(IsHost());
41   }
42
43   void GetStatus(Stream &strm) override;
44
45   bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
46
47   bool CanDebugProcess() override;
48
49   size_t GetSoftwareBreakpointTrapOpcode(Target &target,
50                                          BreakpointSite *bp_site) override;
51
52   Status LaunchProcess(ProcessLaunchInfo &launch_info) override;
53
54   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
55                          Target *target, Status &error) override;
56
57   void CalculateTrapHandlerSymbolNames() override;
58
59   MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
60                                   lldb::addr_t length, unsigned prot,
61                                   unsigned flags, lldb::addr_t fd,
62                                   lldb::addr_t offset) override;
63
64 private:
65   DISALLOW_COPY_AND_ASSIGN(PlatformFreeBSD);
66 };
67
68 } // namespace platform_freebsd
69 } // namespace lldb_private
70
71 #endif // liblldb_PlatformFreeBSD_h_