brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 4abd74e Raw
83 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H10#define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H11 12#include "PlatformDarwinDevice.h"13#include "lldb/Host/FileSystem.h"14#include "lldb/Utility/ConstString.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 28namespace lldb_private {29class FileSpecList;30class ModuleSpec;31class Process;32class Stream;33class Target;34class UUID;35 36class PlatformRemoteDarwinDevice : public PlatformDarwinDevice {37public:38  PlatformRemoteDarwinDevice();39 40  ~PlatformRemoteDarwinDevice() override;41 42  // Platform functions43  void GetStatus(Stream &strm) override;44 45  virtual Status GetSymbolFile(const FileSpec &platform_file,46                               const UUID *uuid_ptr, FileSpec &local_file);47 48  Status GetSharedModule(const ModuleSpec &module_spec, Process *process,49                         lldb::ModuleSP &module_sp,50                         llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules,51                         bool *did_create_ptr) override;52 53  void54  AddClangModuleCompilationOptions(Target *target,55                                   std::vector<std::string> &options) override {56    return PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(57        target, options, XcodeSDK::Type::iPhoneOS);58  }59 60protected:61  std::string m_build_update;62  uint32_t m_last_module_sdk_idx = UINT32_MAX;63  uint32_t m_connected_module_sdk_idx = UINT32_MAX;64 65  bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx,66                    FileSpec &local_file);67 68  uint32_t GetConnectedSDKIndex();69 70  // Get index of SDK in SDKDirectoryInfoCollection by its pointer and return71  // UINT32_MAX if that SDK not found.72  uint32_t GetSDKIndexBySDKDirectoryInfo(const SDKDirectoryInfo *sdk_info);73 74private:75  PlatformRemoteDarwinDevice(const PlatformRemoteDarwinDevice &) = delete;76  const PlatformRemoteDarwinDevice &77  operator=(const PlatformRemoteDarwinDevice &) = delete;78};79 80} // namespace lldb_private81 82#endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H83