]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/Platform/Kalimba/PlatformKalimba.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / source / Plugins / Platform / Kalimba / PlatformKalimba.h
1 //===-- PlatformKalimba.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_PlatformKalimba_h_
11 #define liblldb_PlatformKalimba_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Target/Platform.h"
18
19 namespace lldb_private {
20
21 class PlatformKalimba : public Platform {
22 public:
23   PlatformKalimba(bool is_host);
24
25   ~PlatformKalimba() override;
26
27   static void Initialize();
28
29   static void Terminate();
30
31   //------------------------------------------------------------
32   // lldb_private::PluginInterface functions
33   //------------------------------------------------------------
34   static lldb::PlatformSP CreateInstance(bool force,
35                                          const lldb_private::ArchSpec *arch);
36
37   static lldb_private::ConstString GetPluginNameStatic(bool is_host);
38
39   static const char *GetPluginDescriptionStatic(bool is_host);
40
41   lldb_private::ConstString GetPluginName() override;
42
43   uint32_t GetPluginVersion() override { return 1; }
44
45   //------------------------------------------------------------
46   // lldb_private::Platform functions
47   //------------------------------------------------------------
48   Error ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
49                           lldb::ModuleSP &module_sp,
50                           const FileSpecList *module_search_paths_ptr) override;
51
52   const char *GetDescription() override {
53     return GetPluginDescriptionStatic(IsHost());
54   }
55
56   void GetStatus(Stream &strm) override;
57
58   Error GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid,
59                         FileSpec &local_file) override;
60
61   bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info) override;
62
63   bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
64
65   size_t GetSoftwareBreakpointTrapOpcode(Target &target,
66                                          BreakpointSite *bp_site) override;
67
68   lldb_private::Error
69   LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
70
71   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
72                          Target *target, Error &error) override;
73
74   // Kalimba processes can not be launched by spawning and attaching.
75   bool CanDebugProcess() override { return false; }
76
77   void CalculateTrapHandlerSymbolNames() override;
78
79 protected:
80   lldb::PlatformSP m_remote_platform_sp;
81
82 private:
83   DISALLOW_COPY_AND_ASSIGN(PlatformKalimba);
84 };
85
86 } // namespace lldb_private
87
88 #endif // liblldb_PlatformKalimba_h_