JITLoaderList.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //===-- JITLoaderList.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_JITLOADERLIST_H
  9. #define LLDB_TARGET_JITLOADERLIST_H
  10. #include <mutex>
  11. #include <vector>
  12. #include "lldb/lldb-forward.h"
  13. namespace lldb_private {
  14. /// \class JITLoaderList JITLoaderList.h "lldb/Target/JITLoaderList.h"
  15. ///
  16. /// Class used by the Process to hold a list of its JITLoaders.
  17. class JITLoaderList {
  18. public:
  19. JITLoaderList();
  20. ~JITLoaderList();
  21. void Append(const lldb::JITLoaderSP &jit_loader_sp);
  22. void Remove(const lldb::JITLoaderSP &jit_loader_sp);
  23. size_t GetSize() const;
  24. lldb::JITLoaderSP GetLoaderAtIndex(size_t idx);
  25. void DidLaunch();
  26. void DidAttach();
  27. void ModulesDidLoad(ModuleList &module_list);
  28. private:
  29. std::vector<lldb::JITLoaderSP> m_jit_loaders_vec;
  30. std::recursive_mutex m_jit_loaders_mutex;
  31. };
  32. } // namespace lldb_private
  33. #endif // LLDB_TARGET_JITLOADERLIST_H