1 //===-- JITLoader.h ---------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_JITLoader_h_
11 #define liblldb_JITLoader_h_
15 #include "lldb/Core/PluginInterface.h"
16 #include "lldb/Target/JITLoaderList.h"
18 namespace lldb_private {
20 //----------------------------------------------------------------------
21 /// @class JITLoader JITLoader.h "lldb/Target/JITLoader.h"
22 /// @brief A plug-in interface definition class for JIT loaders.
24 /// Plugins of this kind listen for code generated at runtime in the
25 /// target. They are very similar to dynamic loader, with the difference
26 /// that they do not have information about the target's dyld and
27 /// that there may be multiple JITLoader plugins per process, while
28 /// there is at most one DynamicLoader.
29 //----------------------------------------------------------------------
31 public PluginInterface
34 //------------------------------------------------------------------
35 /// Find a JIT loader plugin for a given process.
37 /// Scans the installed DynamicLoader plug-ins and tries to find
38 /// all applicable instances for the current process.
40 /// @param[in] process
41 /// The process for which to try and locate a JIT loader
44 //------------------------------------------------------------------
46 LoadPlugins (Process *process, lldb_private::JITLoaderList &list);
48 //------------------------------------------------------------------
49 /// Construct with a process.
50 //------------------------------------------------------------------
51 JITLoader (Process *process);
56 //------------------------------------------------------------------
57 /// Called after attaching a process.
59 /// Allow JITLoader plug-ins to execute some code after
60 /// attaching to a process.
61 //------------------------------------------------------------------
65 //------------------------------------------------------------------
66 /// Called after launching a process.
68 /// Allow JITLoader plug-ins to execute some code after
69 /// the process has stopped for the first time on launch.
70 //------------------------------------------------------------------
74 //------------------------------------------------------------------
75 /// Called after a new shared object has been loaded so that it can
76 /// be probed for JIT entry point hooks.
77 //------------------------------------------------------------------
79 ModulesDidLoad (lldb_private::ModuleList &module_list) = 0;
82 //------------------------------------------------------------------
84 //------------------------------------------------------------------
88 } // namespace lldb_private
90 #endif // liblldb_JITLoader_h_