1 //===-- DynamicLoaderStatic.h -----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_DynamicLoaderStatic_h_
11 #define liblldb_DynamicLoaderStatic_h_
12 
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Target/DynamicLoader.h"
18 #include "lldb/Host/FileSpec.h"
19 #include "lldb/Core/UUID.h"
20 #include "lldb/Host/Mutex.h"
21 #include "lldb/Target/Process.h"
22 
23 class DynamicLoaderStatic : public lldb_private::DynamicLoader
24 {
25 public:
26     DynamicLoaderStatic(lldb_private::Process *process);
27 
28     ~DynamicLoaderStatic() override;
29 
30     //------------------------------------------------------------------
31     // Static Functions
32     //------------------------------------------------------------------
33     static void
34     Initialize();
35 
36     static void
37     Terminate();
38 
39     static lldb_private::ConstString
40     GetPluginNameStatic();
41 
42     static const char *
43     GetPluginDescriptionStatic();
44 
45     static lldb_private::DynamicLoader *
46     CreateInstance (lldb_private::Process *process, bool force);
47 
48     //------------------------------------------------------------------
49     /// Called after attaching a process.
50     ///
51     /// Allow DynamicLoader plug-ins to execute some code after
52     /// attaching to a process.
53     //------------------------------------------------------------------
54     void
55     DidAttach() override;
56 
57     void
58     DidLaunch() override;
59 
60     lldb::ThreadPlanSP
61     GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
62                                  bool stop_others) override;
63 
64     lldb_private::Error
65     CanLoadImage() override;
66 
67     //------------------------------------------------------------------
68     // PluginInterface protocol
69     //------------------------------------------------------------------
70     lldb_private::ConstString
71     GetPluginName() override;
72 
73     uint32_t
74     GetPluginVersion() override;
75 
76 private:
77     void
78     LoadAllImagesAtFileAddresses ();
79 
80     DISALLOW_COPY_AND_ASSIGN (DynamicLoaderStatic);
81 };
82 
83 #endif // liblldb_DynamicLoaderStatic_h_
84