LLDB  mainline
PlatformAppleSimulator.h
Go to the documentation of this file.
1 //===-- PlatformAppleSimulator.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_PlatformAppleSimulator_h_
10 #define liblldb_PlatformAppleSimulator_h_
11 
12 #include <mutex>
13 
16 #include "lldb/Utility/FileSpec.h"
17 
18 #include "llvm/ADT/Optional.h"
19 
21 public:
22  // Class Functions
23  static void Initialize();
24 
25  static void Terminate();
26 
27  // Class Methods
29 
30  virtual ~PlatformAppleSimulator();
31 
33  LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
34 
35  void GetStatus(lldb_private::Stream &strm) override;
36 
38 
40 
41  lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
42  lldb_private::Debugger &debugger,
43  lldb_private::Target *target,
44  lldb_private::Status &error) override;
45 
46 protected:
48  llvm::Optional<lldb_private::FileSpec> m_core_simulator_framework_path;
49  llvm::Optional<CoreSimulatorSupport::Device> m_device;
50 
52 
53  void LoadCoreSimulator();
54 
55 #if defined(__APPLE__)
56  CoreSimulatorSupport::Device GetSimulatorDevice();
57 #endif
58 
59 private:
60  DISALLOW_COPY_AND_ASSIGN(PlatformAppleSimulator);
61 };
62 
63 #endif // liblldb_PlatformAppleSimulator_h_
A class to manage flag bits.
Definition: Debugger.h:82
A command line argument class.
Definition: Args.h:32
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
lldb_private::Status LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override
Launch a new process on a platform, not necessarily for debugging, it could be just for running the p...
A file utility class.
Definition: FileSpec.h:55
llvm::Optional< lldb_private::FileSpec > m_core_simulator_framework_path
lldb_private::FileSpec GetCoreSimulatorPath()
void GetStatus(lldb_private::Stream &strm) override
Report the current status for this platform.
PlatformAppleSimulator()
Default Constructor.
lldb_private::Status ConnectRemote(lldb_private::Args &args) override
lldb_private::Status DisconnectRemote() override
llvm::Optional< CoreSimulatorSupport::Device > m_device
virtual ~PlatformAppleSimulator()
Destructor.
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...
An error handling class.
Definition: Status.h:44