LLDB mainline
PlatformPOSIX.h
Go to the documentation of this file.
1//===-- PlatformPOSIX.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_POSIX_PLATFORMPOSIX_H
10#define LLDB_SOURCE_PLUGINS_PLATFORM_POSIX_PLATFORMPOSIX_H
11
12#include <map>
13#include <memory>
14
17
19public:
20 PlatformPOSIX(bool is_host);
21
22 ~PlatformPOSIX() override;
23
24 // lldb_private::Platform functions
25
28
30 const lldb_private::FileSpec &destination,
31 uint32_t uid = UINT32_MAX,
32 uint32_t gid = UINT32_MAX) override;
33
35 GetFile(const lldb_private::FileSpec &source,
36 const lldb_private::FileSpec &destination) override;
37
39
41 lldb_private::Debugger &debugger,
42 lldb_private::Target *target, // Can be nullptr, if
43 // nullptr create a new
44 // target, else use
45 // existing one
46 lldb_private::Status &error) override;
47
49 lldb_private::Debugger &debugger,
51 lldb_private::Status &error) override;
52
53 std::string GetPlatformSpecificConnectionInformation() override;
54
55 void CalculateTrapHandlerSymbolNames() override;
56
58
60
61 uint32_t DoLoadImage(lldb_private::Process *process,
62 const lldb_private::FileSpec &remote_file,
63 const std::vector<std::string> *paths,
65 lldb_private::FileSpec *loaded_image) override;
66
68 uint32_t image_token) override;
69
71
72protected:
73 std::unique_ptr<lldb_private::OptionGroupPlatformRSync>
75 std::unique_ptr<lldb_private::OptionGroupPlatformSSH>
77 std::unique_ptr<lldb_private::OptionGroupPlatformCaching>
79
81 std::unique_ptr<lldb_private::OptionGroupOptions>>
83
85 EvaluateLibdlExpression(lldb_private::Process *process, const char *expr_cstr,
86 llvm::StringRef expr_prefix,
87 lldb::ValueObjectSP &result_valobj_sp);
88
89 std::unique_ptr<lldb_private::UtilityFunction>
92
93 virtual
95
96private:
97 PlatformPOSIX(const PlatformPOSIX &) = delete;
98 const PlatformPOSIX &operator=(const PlatformPOSIX &) = delete;
99};
100
101#endif // LLDB_SOURCE_PLUGINS_PLATFORM_POSIX_PLATFORMPOSIX_H
static llvm::raw_ostream & error(Stream &strm)
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.
std::map< lldb_private::CommandInterpreter *, std::unique_ptr< lldb_private::OptionGroupOptions > > m_options
Definition: PlatformPOSIX.h:82
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...
lldb_private::Status GetFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
PlatformPOSIX(const PlatformPOSIX &)=delete
lldb_private::Status ConnectRemote(lldb_private::Args &args) override
lldb_private::Status DisconnectRemote() override
lldb_private::Status UnloadImage(lldb_private::Process *process, uint32_t image_token) override
lldb_private::Status EvaluateLibdlExpression(lldb_private::Process *process, const char *expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp)
lldb_private::Status PutFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX) override
std::unique_ptr< lldb_private::UtilityFunction > MakeLoadImageUtilityFunction(lldb_private::ExecutionContext &exe_ctx, lldb_private::Status &error)
std::unique_ptr< lldb_private::OptionGroupPlatformRSync > m_option_group_platform_rsync
Definition: PlatformPOSIX.h:74
const PlatformPOSIX & operator=(const PlatformPOSIX &)=delete
~PlatformPOSIX() override
Destructor.
lldb_private::OptionGroupOptions * GetConnectionOptions(lldb_private::CommandInterpreter &interpreter) override
std::unique_ptr< lldb_private::OptionGroupPlatformCaching > m_option_group_platform_caching
Definition: PlatformPOSIX.h:78
std::string GetPlatformSpecificConnectionInformation() override
const lldb::UnixSignalsSP & GetRemoteUnixSignals() override
std::unique_ptr< lldb_private::OptionGroupPlatformSSH > m_option_group_platform_ssh
Definition: PlatformPOSIX.h:76
void CalculateTrapHandlerSymbolNames() override
Ask the Platform subclass to fill in the list of trap handler names.
lldb_private::ConstString GetFullNameForDylib(lldb_private::ConstString basename) override
virtual llvm::StringRef GetLibdlFunctionDeclarations(lldb_private::Process *process)
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_image) override
A command line argument class.
Definition: Args.h:33
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
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
#define UINT32_MAX
Definition: lldb-defines.h:19
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:475
std::shared_ptr< lldb_private::UnixSignals > UnixSignalsSP
Definition: lldb-forward.h:471
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:384