LLDB  mainline
PlatformRemoteDarwinDevice.h
Go to the documentation of this file.
1 //===-- PlatformRemoteDarwinDevice.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_MACOSX_PLATFORMREMOTEDARWINDEVICE_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H
11 
12 #include "PlatformDarwinDevice.h"
13 #include "lldb/Host/FileSystem.h"
15 #include "lldb/Utility/FileSpec.h"
16 #include "lldb/Utility/Status.h"
17 #include "lldb/Utility/XcodeSDK.h"
18 #include "lldb/lldb-forward.h"
19 #include "llvm/ADT/SmallVector.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/FileSystem.h"
22 #include "llvm/Support/VersionTuple.h"
23 
24 #include <mutex>
25 #include <string>
26 #include <vector>
27 
28 namespace lldb_private {
29 class FileSpecList;
30 class ModuleSpec;
31 class Process;
32 class Stream;
33 class Target;
34 class UUID;
35 
37 public:
39 
40  ~PlatformRemoteDarwinDevice() override;
41 
42  // Platform functions
43  Status
44  ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
45  const FileSpecList *module_search_paths_ptr) override;
46 
47  void GetStatus(Stream &strm) override;
48 
49  virtual Status GetSymbolFile(const FileSpec &platform_file,
50  const UUID *uuid_ptr, FileSpec &local_file);
51 
52  Status GetSharedModule(const ModuleSpec &module_spec, Process *process,
53  lldb::ModuleSP &module_sp,
54  const FileSpecList *module_search_paths_ptr,
56  bool *did_create_ptr) override;
57 
58  void
60  std::vector<std::string> &options) override {
62  target, options, XcodeSDK::Type::iPhoneOS);
63  }
64 
65 protected:
69 
70  bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx,
71  FileSpec &local_file);
72 
74 
75  // Get index of SDK in SDKDirectoryInfoCollection by its pointer and return
76  // UINT32_MAX if that SDK not found.
78 
79 private:
82  operator=(const PlatformRemoteDarwinDevice &) = delete;
83 };
84 
85 } // namespace lldb_private
86 
87 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H
lldb_private::UUID
Definition: UUID.h:23
FileSystem.h
lldb_private::PlatformRemoteDarwinDevice::m_connected_module_sdk_idx
uint32_t m_connected_module_sdk_idx
Definition: PlatformRemoteDarwinDevice.h:68
lldb_private::PlatformRemoteDarwinDevice::GetStatus
void GetStatus(Stream &strm) override
Report the current status for this platform.
Definition: PlatformRemoteDarwinDevice.cpp:49
lldb_private::PlatformRemoteDarwinDevice::m_last_module_sdk_idx
uint32_t m_last_module_sdk_idx
Definition: PlatformRemoteDarwinDevice.h:67
lldb_private::Process
Definition: Process.h:338
lldb_private::PlatformRemoteDarwinDevice::PlatformRemoteDarwinDevice
PlatformRemoteDarwinDevice()
Default Constructor.
Definition: PlatformRemoteDarwinDevice.cpp:40
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Target
Definition: Target.h:473
XcodeSDK.h
lldb_private::PlatformRemoteDarwinDevice::GetSharedModule
Status GetSharedModule(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr) override
Definition: PlatformRemoteDarwinDevice.cpp:223
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo
Definition: PlatformDarwinDevice.h:32
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::PlatformRemoteDarwinDevice::GetSDKIndexBySDKDirectoryInfo
uint32_t GetSDKIndexBySDKDirectoryInfo(const SDKDirectoryInfo *sdk_info)
Definition: PlatformRemoteDarwinDevice.cpp:375
lldb_private::PlatformRemoteDarwinDevice::GetConnectedSDKIndex
uint32_t GetConnectedSDKIndex()
Definition: PlatformRemoteDarwinDevice.cpp:355
lldb_private::LLDBLog::Process
@ Process
lldb_private::PlatformRemoteDarwinDevice
Definition: PlatformRemoteDarwinDevice.h:36
lldb_private::PlatformRemoteDarwinDevice::ResolveExecutable
Status ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) override
Find a platform plugin for a given process.
Definition: PlatformRemoteDarwinDevice.cpp:65
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::PlatformRemoteDarwinDevice::operator=
const PlatformRemoteDarwinDevice & operator=(const PlatformRemoteDarwinDevice &)=delete
lldb_private::PlatformRemoteDarwinDevice::~PlatformRemoteDarwinDevice
~PlatformRemoteDarwinDevice() override
Destructor.
PlatformDarwinDevice.h
lldb_private::PlatformRemoteDarwinDevice::AddClangModuleCompilationOptions
void AddClangModuleCompilationOptions(Target *target, std::vector< std::string > &options) override
Definition: PlatformRemoteDarwinDevice.h:59
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::Status
Definition: Status.h:44
lldb_private::PlatformDarwin::AddClangModuleCompilationOptionsForSDKType
void AddClangModuleCompilationOptionsForSDKType(Target *target, std::vector< std::string > &options, XcodeSDK::Type sdk_type)
Definition: PlatformDarwin.cpp:981
uint32_t
lldb_private::PlatformDarwinDevice
Abstract Darwin platform with a potential device support directory.
Definition: PlatformDarwinDevice.h:21
lldb_private::PlatformRemoteDarwinDevice::GetSymbolFile
virtual Status GetSymbolFile(const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file)
Definition: PlatformRemoteDarwinDevice.cpp:163
lldb_private::PlatformRemoteDarwinDevice::GetFileInSDK
bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx, FileSpec &local_file)
Definition: PlatformRemoteDarwinDevice.cpp:130
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb-forward.h
Status.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::LLDBLog::Target
@ Target
FileSpec.h
ConstString.h
lldb_private::PlatformRemoteDarwinDevice::m_build_update
std::string m_build_update
Definition: PlatformRemoteDarwinDevice.h:66
llvm::SmallVectorImpl
Definition: Disassembler.h:42