LLDB  mainline
PlatformiOSSimulator.h
Go to the documentation of this file.
1 //===-- PlatformiOSSimulator.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 liblldb_PlatformiOSSimulator_h_
10 #define liblldb_PlatformiOSSimulator_h_
11 
12 #include <mutex>
13 #include <string>
14 
15 #include "PlatformAppleSimulator.h"
16 
18 public:
20 
21  ~PlatformiOSSimulator() override;
22 
23  // Class Functions
24  static lldb::PlatformSP CreateInstance(bool force,
25  const lldb_private::ArchSpec *arch);
26 
27  static void Initialize();
28 
29  static void Terminate();
30 
32 
33  static const char *GetDescriptionStatic();
34 
35  // lldb_private::PluginInterface functions
37  return GetPluginNameStatic();
38  }
39 
40  uint32_t GetPluginVersion() override { return 1; }
41 
42  // lldb_private::Platform functions
44  const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
45  const lldb_private::FileSpecList *module_search_paths_ptr) override;
46 
47  const char *GetDescription() override { return GetDescriptionStatic(); }
48 
49  void GetStatus(lldb_private::Stream &strm) override;
50 
51  virtual lldb_private::Status
52  GetSymbolFile(const lldb_private::FileSpec &platform_file,
53  const lldb_private::UUID *uuid_ptr,
54  lldb_private::FileSpec &local_file);
55 
57  GetSharedModule(const lldb_private::ModuleSpec &module_spec,
58  lldb_private::Process *process, lldb::ModuleSP &module_sp,
59  const lldb_private::FileSpecList *module_search_paths_ptr,
60  lldb::ModuleSP *old_module_sp_ptr,
61  bool *did_create_ptr) override;
62 
63  uint32_t
65  lldb_private::ProcessInstanceInfoList &process_infos) override;
66 
68  lldb_private::ArchSpec &arch) override;
69 
70  void
72  std::vector<std::string> &options) override {
74  target, options, PlatformDarwin::SDKType::iPhoneSimulator);
75  }
76 
77 protected:
78  std::mutex m_sdk_dir_mutex;
79  std::string m_sdk_directory;
80  std::string m_build_update;
81 
82  const char *GetSDKDirectoryAsCString();
83 
84 private:
85  DISALLOW_COPY_AND_ASSIGN(PlatformiOSSimulator);
86 };
87 
88 #endif // liblldb_PlatformiOSSimulator_h_
const char * GetDescription() override
virtual lldb_private::Status GetSymbolFile(const lldb_private::FileSpec &platform_file, const lldb_private::UUID *uuid_ptr, lldb_private::FileSpec &local_file)
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
~PlatformiOSSimulator() override
Destructor.
A file utility class.
Definition: FileSpec.h:55
An architecture specification class.
Definition: ArchSpec.h:32
lldb_private::ConstString GetPluginName() override
lldb_private::Status ResolveExecutable(const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const lldb_private::FileSpecList *module_search_paths_ptr) override
lldb_private::Status GetSharedModule(const lldb_private::ModuleSpec &module_spec, lldb_private::Process *process, lldb::ModuleSP &module_sp, const lldb_private::FileSpecList *module_search_paths_ptr, lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr) override
void AddClangModuleCompilationOptions(lldb_private::Target *target, std::vector< std::string > &options) override
const char * GetSDKDirectoryAsCString()
void GetStatus(lldb_private::Stream &strm) override
Report the current status for this platform.
A plug-in interface definition class for debugging a process.
Definition: Process.h:353
uint32_t FindProcesses(const lldb_private::ProcessInstanceInfoMatch &match_info, lldb_private::ProcessInstanceInfoList &process_infos) override
Attach to an existing process by process name.
A uniqued constant string class.
Definition: ConstString.h:38
static const char * GetDescriptionStatic()
bool GetSupportedArchitectureAtIndex(uint32_t idx, lldb_private::ArchSpec &arch) override
Get the platform&#39;s supported architectures in the order in which they should be searched.
uint32_t GetPluginVersion() override
static lldb_private::ConstString GetPluginNameStatic()
PlatformiOSSimulator()
Default Constructor.
void AddClangModuleCompilationOptionsForSDKType(lldb_private::Target *target, std::vector< std::string > &options, SDKType sdk_type)
static lldb::PlatformSP CreateInstance(bool force, const lldb_private::ArchSpec *arch)
An error handling class.
Definition: Status.h:44