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