LLDB mainline
PlatformWindows.h
Go to the documentation of this file.
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
13
14namespace lldb_private {
15
17public:
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 llvm::StringRef GetPluginNameStatic(bool is_host) {
29 return is_host ? Platform::GetHostPlatformName() : "remote-windows";
30 }
31
32 static llvm::StringRef GetPluginDescriptionStatic(bool is_host);
33
34 llvm::StringRef GetPluginName() override {
36 }
37
38 // lldb_private::Platform functions
39 llvm::StringRef GetDescription() override {
41 }
42
44
46
47 uint32_t DoLoadImage(lldb_private::Process *process,
48 const lldb_private::FileSpec &remote_file,
49 const std::vector<std::string> *paths,
51 lldb_private::FileSpec *loaded_path) override;
52
54 uint32_t image_token) override;
55
57 lldb_private::Debugger &debugger,
59 lldb_private::Status &error) override;
60
62 lldb_private::Debugger &debugger,
64 lldb_private::Status &error) override;
65
66 std::vector<ArchSpec>
67 GetSupportedArchitectures(const ArchSpec &process_host_arch) override {
69 }
70
71 void GetStatus(lldb_private::Stream &strm) override;
72
73 bool CanDebugProcess() override;
74
75 // FIXME not sure what the _sigtramp equivalent would be on this platform
77
79
81 BreakpointSite *bp_site) override;
82
83 std::vector<ArchSpec> m_supported_architectures;
84
85private:
86 std::unique_ptr<lldb_private::UtilityFunction>
88 lldb_private::Status &status);
89
91 const char *expression,
92 lldb::ValueObjectSP &value);
93};
94
95} // namespace lldb_private
96
97#endif // LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition: ArchSpec.h:31
A command line argument class.
Definition: Args.h:33
Class that manages the actual breakpoint that will be inserted into the running program.
A uniqued constant string class.
Definition: ConstString.h:40
A class to manage flag bits.
Definition: Debugger.h:80
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A file utility class.
Definition: FileSpec.h:56
lldb_private::Status UnloadImage(lldb_private::Process *process, uint32_t image_token) override
llvm::StringRef GetPluginName() override
std::unique_ptr< lldb_private::UtilityFunction > MakeLoadImageUtilityFunction(lldb_private::ExecutionContext &context, lldb_private::Status &status)
lldb_private::Status DisconnectRemote() override
ConstString GetFullNameForDylib(ConstString basename) override
lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info, lldb_private::Debugger &debugger, lldb_private::Target *target, lldb_private::Status &error) override
Attach to an existing process using a process ID.
llvm::StringRef GetDescription() override
static llvm::StringRef GetPluginDescriptionStatic(bool is_host)
std::vector< ArchSpec > GetSupportedArchitectures(const ArchSpec &process_host_arch) override
Get the platform's supported architectures in the order in which they should be searched.
void CalculateTrapHandlerSymbolNames() override
Ask the Platform subclass to fill in the list of trap handler names.
void GetStatus(lldb_private::Stream &strm) override
Report the current status for this platform.
std::vector< ArchSpec > m_supported_architectures
lldb_private::Status ConnectRemote(lldb_private::Args &args) override
lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info, lldb_private::Debugger &debugger, lldb_private::Target &target, lldb_private::Status &error) override
Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed b...
static llvm::StringRef GetPluginNameStatic(bool is_host)
static lldb::PlatformSP CreateInstance(bool force, const lldb_private::ArchSpec *arch)
uint32_t DoLoadImage(lldb_private::Process *process, const lldb_private::FileSpec &remote_file, const std::vector< std::string > *paths, lldb_private::Status &error, lldb_private::FileSpec *loaded_path) override
lldb_private::Status EvaluateLoaderExpression(lldb_private::Process *process, const char *expression, lldb::ValueObjectSP &value)
bool CanDebugProcess() override
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specifi...
size_t GetSoftwareBreakpointTrapOpcode(Target &target, BreakpointSite *bp_site) override
bool IsHost() const
Definition: Platform.h:478
static const char * GetHostPlatformName()
Definition: Platform.cpp:61
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
A base class for platforms which automatically want to be able to forward operations to a remote plat...
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480
std::shared_ptr< lldb_private::Platform > PlatformSP
Definition: lldb-forward.h:386
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387