1 //===-- PlatformKalimba.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_PlatformKalimba_h_
11 #define liblldb_PlatformKalimba_h_
15 // Other libraries and framework includes
17 #include "lldb/Target/Platform.h"
19 namespace lldb_private {
21 class PlatformKalimba : public Platform {
23 PlatformKalimba(bool is_host);
25 ~PlatformKalimba() override;
27 static void Initialize();
29 static void Terminate();
31 //------------------------------------------------------------
32 // lldb_private::PluginInterface functions
33 //------------------------------------------------------------
34 static lldb::PlatformSP CreateInstance(bool force,
35 const lldb_private::ArchSpec *arch);
37 static lldb_private::ConstString GetPluginNameStatic(bool is_host);
39 static const char *GetPluginDescriptionStatic(bool is_host);
41 lldb_private::ConstString GetPluginName() override;
43 uint32_t GetPluginVersion() override { return 1; }
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;
52 const char *GetDescription() override {
53 return GetPluginDescriptionStatic(IsHost());
56 void GetStatus(Stream &strm) override;
58 Error GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid,
59 FileSpec &local_file) override;
61 bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info) override;
63 bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
65 size_t GetSoftwareBreakpointTrapOpcode(Target &target,
66 BreakpointSite *bp_site) override;
69 LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
71 lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
72 Target *target, Error &error) override;
74 // Kalimba processes can not be launched by spawning and attaching.
75 bool CanDebugProcess() override { return false; }
77 void CalculateTrapHandlerSymbolNames() override;
80 lldb::PlatformSP m_remote_platform_sp;
83 DISALLOW_COPY_AND_ASSIGN(PlatformKalimba);
86 } // namespace lldb_private
88 #endif // liblldb_PlatformKalimba_h_