1 //===-- Runtime.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_TARGET_RUNTIME_H
10 #define LLDB_TARGET_RUNTIME_H
11 
12 #include "lldb/Target/Process.h"
13 
14 namespace lldb_private {
15 class Runtime {
16 public:
Runtime(Process * process)17   Runtime(Process *process) : m_process(process) {}
18   virtual ~Runtime() = default;
19   Runtime(const Runtime &) = delete;
20   const Runtime &operator=(const Runtime &) = delete;
21 
GetProcess()22   Process *GetProcess() { return m_process; }
GetTargetRef()23   Target &GetTargetRef() { return m_process->GetTarget(); }
24 
25   /// Called when modules have been loaded in the process.
26   virtual void ModulesDidLoad(const ModuleList &module_list) = 0;
27 
28 protected:
29   Process *m_process;
30 };
31 } // namespace lldb_private
32 
33 #endif // LLDB_TARGET_RUNTIME_H
34