Runtime.h 1020 B

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