]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / source / Plugins / DynamicLoader / Static / DynamicLoaderStatic.h
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/Core/UUID.h"
18 #include "lldb/Host/FileSpec.h"
19 #include "lldb/Target/DynamicLoader.h"
20 #include "lldb/Target/Process.h"
21
22 class DynamicLoaderStatic : public lldb_private::DynamicLoader {
23 public:
24   DynamicLoaderStatic(lldb_private::Process *process);
25
26   ~DynamicLoaderStatic() override;
27
28   //------------------------------------------------------------------
29   // Static Functions
30   //------------------------------------------------------------------
31   static void Initialize();
32
33   static void Terminate();
34
35   static lldb_private::ConstString GetPluginNameStatic();
36
37   static const char *GetPluginDescriptionStatic();
38
39   static lldb_private::DynamicLoader *
40   CreateInstance(lldb_private::Process *process, bool force);
41
42   //------------------------------------------------------------------
43   /// Called after attaching a process.
44   ///
45   /// Allow DynamicLoader plug-ins to execute some code after
46   /// attaching to a process.
47   //------------------------------------------------------------------
48   void DidAttach() override;
49
50   void DidLaunch() override;
51
52   lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
53                                                   bool stop_others) override;
54
55   lldb_private::Error CanLoadImage() override;
56
57   //------------------------------------------------------------------
58   // PluginInterface protocol
59   //------------------------------------------------------------------
60   lldb_private::ConstString GetPluginName() override;
61
62   uint32_t GetPluginVersion() override;
63
64 private:
65   void LoadAllImagesAtFileAddresses();
66
67   DISALLOW_COPY_AND_ASSIGN(DynamicLoaderStatic);
68 };
69
70 #endif // liblldb_DynamicLoaderStatic_h_