1 //===-- PlatformWindows.h ---------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
12 #include "lldb/Target/RemoteAwarePlatform.h"
14 namespace lldb_private
{
16 class PlatformWindows
: public RemoteAwarePlatform
{
18 PlatformWindows(bool is_host
);
20 static void Initialize();
22 static void Terminate();
24 // lldb_private::PluginInterface functions
25 static lldb::PlatformSP
CreateInstance(bool force
,
26 const lldb_private::ArchSpec
*arch
);
28 static llvm::StringRef
GetPluginNameStatic(bool is_host
) {
29 return is_host
? Platform::GetHostPlatformName() : "remote-windows";
32 static llvm::StringRef
GetPluginDescriptionStatic(bool is_host
);
34 llvm::StringRef
GetPluginName() override
{
35 return GetPluginNameStatic(IsHost());
38 // lldb_private::Platform functions
39 llvm::StringRef
GetDescription() override
{
40 return GetPluginDescriptionStatic(IsHost());
43 lldb_private::Status
ConnectRemote(lldb_private::Args
&args
) override
;
45 lldb_private::Status
DisconnectRemote() override
;
47 uint32_t DoLoadImage(lldb_private::Process
*process
,
48 const lldb_private::FileSpec
&remote_file
,
49 const std::vector
<std::string
> *paths
,
50 lldb_private::Status
&error
,
51 lldb_private::FileSpec
*loaded_path
) override
;
53 lldb_private::Status
UnloadImage(lldb_private::Process
*process
,
54 uint32_t image_token
) override
;
56 lldb::ProcessSP
DebugProcess(lldb_private::ProcessLaunchInfo
&launch_info
,
57 lldb_private::Debugger
&debugger
,
58 lldb_private::Target
&target
,
59 lldb_private::Status
&error
) override
;
61 lldb::ProcessSP
Attach(lldb_private::ProcessAttachInfo
&attach_info
,
62 lldb_private::Debugger
&debugger
,
63 lldb_private::Target
*target
,
64 lldb_private::Status
&error
) override
;
67 GetSupportedArchitectures(const ArchSpec
&process_host_arch
) override
{
68 return m_supported_architectures
;
71 void GetStatus(lldb_private::Stream
&strm
) override
;
73 bool CanDebugProcess() override
;
75 // FIXME not sure what the _sigtramp equivalent would be on this platform
76 void CalculateTrapHandlerSymbolNames() override
{}
78 ConstString
GetFullNameForDylib(ConstString basename
) override
;
80 size_t GetSoftwareBreakpointTrapOpcode(Target
&target
,
81 BreakpointSite
*bp_site
) override
;
83 std::vector
<ArchSpec
> m_supported_architectures
;
86 std::unique_ptr
<lldb_private::UtilityFunction
>
87 MakeLoadImageUtilityFunction(lldb_private::ExecutionContext
&context
,
88 lldb_private::Status
&status
);
90 lldb_private::Status
EvaluateLoaderExpression(lldb_private::Process
*process
,
91 const char *expression
,
92 lldb::ValueObjectSP
&value
);
95 } // namespace lldb_private
97 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H