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 #include <map>
16 #include <vector>
17 #include <string>
18 
19 // Other libraries and framework includes
20 
21 #include "lldb/Target/DynamicLoader.h"
22 #include "lldb/Host/FileSpec.h"
23 #include "lldb/Core/UUID.h"
24 #include "lldb/Host/Mutex.h"
25 #include "lldb/Target/Process.h"
26 
27 class DynamicLoaderStatic : public lldb_private::DynamicLoader
28 {
29 public:
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     DynamicLoaderStatic (lldb_private::Process *process);
49 
50     virtual
51     ~DynamicLoaderStatic ();
52     //------------------------------------------------------------------
53     /// Called after attaching a process.
54     ///
55     /// Allow DynamicLoader plug-ins to execute some code after
56     /// attaching to a process.
57     //------------------------------------------------------------------
58     virtual void
59     DidAttach ();
60 
61     virtual void
62     DidLaunch ();
63 
64     virtual lldb::ThreadPlanSP
65     GetStepThroughTrampolinePlan (lldb_private::Thread &thread,
66                                   bool stop_others);
67 
68     virtual lldb_private::Error
69     CanLoadImage ();
70 
71     //------------------------------------------------------------------
72     // PluginInterface protocol
73     //------------------------------------------------------------------
74     virtual lldb_private::ConstString
75     GetPluginName();
76 
77     virtual uint32_t
78     GetPluginVersion();
79 
80 private:
81     void
82     LoadAllImagesAtFileAddresses ();
83 
84     DISALLOW_COPY_AND_ASSIGN (DynamicLoaderStatic);
85 };
86 
87 #endif  // liblldb_DynamicLoaderStatic_h_
88