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 LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_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   static void Initialize();
21 
22   static void Terminate();
23 
24   // lldb_private::PluginInterface functions
25   static lldb::PlatformSP CreateInstance(bool force,
26                                          const lldb_private::ArchSpec *arch);
27 
28   static lldb_private::ConstString GetPluginNameStatic(bool is_host);
29 
30   static const char *GetPluginDescriptionStatic(bool is_host);
31 
32   lldb_private::ConstString GetPluginName() override;
33 
GetPluginVersion()34   uint32_t GetPluginVersion() override { return 1; }
35 
36   // lldb_private::Platform functions
GetDescription()37   const char *GetDescription() override {
38     return GetPluginDescriptionStatic(IsHost());
39   }
40 
41   lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
42 
43   lldb_private::Status DisconnectRemote() override;
44 
45   lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
46                                lldb_private::Debugger &debugger,
47                                lldb_private::Target *target,
48                                lldb_private::Status &error) override;
49 
50   lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info,
51                          lldb_private::Debugger &debugger,
52                          lldb_private::Target *target,
53                          lldb_private::Status &error) override;
54 
55   bool GetSupportedArchitectureAtIndex(uint32_t idx,
56                                        lldb_private::ArchSpec &arch) override;
57 
58   void GetStatus(lldb_private::Stream &strm) override;
59 
60   bool CanDebugProcess() override;
61 
62   // FIXME not sure what the _sigtramp equivalent would be on this platform
CalculateTrapHandlerSymbolNames()63   void CalculateTrapHandlerSymbolNames() override {}
64 
65   ConstString GetFullNameForDylib(ConstString basename) override;
66 };
67 
68 } // namespace lldb_private
69 
70 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
71