[LLVM][NVPTX] Add support for griddepcontrol instruction (#123511)
[llvm-project.git] / lldb / source / Plugins / Platform / MacOSX / PlatformRemoteDarwinDevice.h
blob557f4876e91abaf6658a9b552283268d93f18386
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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H
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"
24 #include <mutex>
25 #include <string>
26 #include <vector>
28 namespace lldb_private {
29 class FileSpecList;
30 class ModuleSpec;
31 class Process;
32 class Stream;
33 class Target;
34 class UUID;
36 class PlatformRemoteDarwinDevice : public PlatformDarwinDevice {
37 public:
38 PlatformRemoteDarwinDevice();
40 ~PlatformRemoteDarwinDevice() override;
42 // Platform functions
43 void GetStatus(Stream &strm) override;
45 virtual Status GetSymbolFile(const FileSpec &platform_file,
46 const UUID *uuid_ptr, FileSpec &local_file);
48 Status GetSharedModule(const ModuleSpec &module_spec, Process *process,
49 lldb::ModuleSP &module_sp,
50 const FileSpecList *module_search_paths_ptr,
51 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules,
52 bool *did_create_ptr) override;
54 void
55 AddClangModuleCompilationOptions(Target *target,
56 std::vector<std::string> &options) override {
57 return PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
58 target, options, XcodeSDK::Type::iPhoneOS);
61 protected:
62 std::string m_build_update;
63 uint32_t m_last_module_sdk_idx = UINT32_MAX;
64 uint32_t m_connected_module_sdk_idx = UINT32_MAX;
66 bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx,
67 FileSpec &local_file);
69 uint32_t GetConnectedSDKIndex();
71 // Get index of SDK in SDKDirectoryInfoCollection by its pointer and return
72 // UINT32_MAX if that SDK not found.
73 uint32_t GetSDKIndexBySDKDirectoryInfo(const SDKDirectoryInfo *sdk_info);
75 private:
76 PlatformRemoteDarwinDevice(const PlatformRemoteDarwinDevice &) = delete;
77 const PlatformRemoteDarwinDevice &
78 operator=(const PlatformRemoteDarwinDevice &) = delete;
81 } // namespace lldb_private
83 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMREMOTEDARWINDEVICE_H