xref: /openbsd-src/gnu/llvm/lldb/source/Plugins/Platform/Windows/PlatformWindows.h (revision 46035553bfdd96e63c94e32da0210227ec2e3cf1)
1 //===-- PlatformWindows.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_PlatformWindows_h_
10 #define liblldb_PlatformWindows_h_
11 
12 #include "lldb/Target/RemoteAwarePlatform.h"
13 
14 namespace lldb_private {
15 
16 class PlatformWindows : public RemoteAwarePlatform {
17 public:
18   PlatformWindows(bool is_host);
19 
20   ~PlatformWindows() override;
21 
22   static void Initialize();
23 
24   static void Terminate();
25 
26   // lldb_private::PluginInterface functions
27   static lldb::PlatformSP CreateInstance(bool force,
28                                          const lldb_private::ArchSpec *arch);
29 
30   static lldb_private::ConstString GetPluginNameStatic(bool is_host);
31 
32   static const char *GetPluginDescriptionStatic(bool is_host);
33 
34   lldb_private::ConstString GetPluginName() override;
35 
36   uint32_t GetPluginVersion() override { return 1; }
37 
38   // lldb_private::Platform functions
39   Status
40   ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
41                     lldb::ModuleSP &module_sp,
42                     const FileSpecList *module_search_paths_ptr) override;
43 
44   const char *GetDescription() override {
45     return GetPluginDescriptionStatic(IsHost());
46   }
47 
48   lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
49 
50   lldb_private::Status DisconnectRemote() override;
51 
52   lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
53                                lldb_private::Debugger &debugger,
54                                lldb_private::Target *target,
55                                lldb_private::Status &error) override;
56 
57   lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info,
58                          lldb_private::Debugger &debugger,
59                          lldb_private::Target *target,
60                          lldb_private::Status &error) override;
61 
62   bool GetSupportedArchitectureAtIndex(uint32_t idx,
63                                        lldb_private::ArchSpec &arch) override;
64 
65   void GetStatus(lldb_private::Stream &strm) override;
66 
67   bool CanDebugProcess() override;
68 
69   // FIXME not sure what the _sigtramp equivalent would be on this platform
70   void CalculateTrapHandlerSymbolNames() override {}
71 
72   ConstString GetFullNameForDylib(ConstString basename) override;
73 
74 private:
75   DISALLOW_COPY_AND_ASSIGN(PlatformWindows);
76 };
77 
78 } // namespace lldb_private
79 
80 #endif // liblldb_PlatformWindows_h_
81