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 #include "llvm/Support/MachO.h" 21 22 #include "lldb/Target/DynamicLoader.h" 23 #include "lldb/Host/FileSpec.h" 24 #include "lldb/Core/UUID.h" 25 #include "lldb/Host/Mutex.h" 26 #include "lldb/Target/Process.h" 27 28 class DynamicLoaderStatic : public lldb_private::DynamicLoader 29 { 30 public: 31 //------------------------------------------------------------------ 32 // Static Functions 33 //------------------------------------------------------------------ 34 static void 35 Initialize(); 36 37 static void 38 Terminate(); 39 40 static lldb_private::ConstString 41 GetPluginNameStatic(); 42 43 static const char * 44 GetPluginDescriptionStatic(); 45 46 static lldb_private::DynamicLoader * 47 CreateInstance (lldb_private::Process *process, bool force); 48 49 DynamicLoaderStatic (lldb_private::Process *process); 50 51 virtual 52 ~DynamicLoaderStatic (); 53 //------------------------------------------------------------------ 54 /// Called after attaching a process. 55 /// 56 /// Allow DynamicLoader plug-ins to execute some code after 57 /// attaching to a process. 58 //------------------------------------------------------------------ 59 virtual void 60 DidAttach (); 61 62 virtual void 63 DidLaunch (); 64 65 virtual lldb::ThreadPlanSP 66 GetStepThroughTrampolinePlan (lldb_private::Thread &thread, 67 bool stop_others); 68 69 virtual lldb_private::Error 70 CanLoadImage (); 71 72 //------------------------------------------------------------------ 73 // PluginInterface protocol 74 //------------------------------------------------------------------ 75 virtual lldb_private::ConstString 76 GetPluginName(); 77 78 virtual uint32_t 79 GetPluginVersion(); 80 81 private: 82 void 83 LoadAllImagesAtFileAddresses (); 84 85 DISALLOW_COPY_AND_ASSIGN (DynamicLoaderStatic); 86 }; 87 88 #endif // liblldb_DynamicLoaderStatic_h_ 89