1 //===-- DynamicLoaderStatic.h -----------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef liblldb_DynamicLoaderStatic_h_ 10 #define liblldb_DynamicLoaderStatic_h_ 11 12 #include "lldb/Target/DynamicLoader.h" 13 #include "lldb/Target/Process.h" 14 #include "lldb/Utility/FileSpec.h" 15 #include "lldb/Utility/UUID.h" 16 17 class DynamicLoaderStatic : public lldb_private::DynamicLoader { 18 public: 19 DynamicLoaderStatic(lldb_private::Process *process); 20 21 ~DynamicLoaderStatic() override; 22 23 //------------------------------------------------------------------ 24 // Static Functions 25 //------------------------------------------------------------------ 26 static void Initialize(); 27 28 static void Terminate(); 29 30 static lldb_private::ConstString GetPluginNameStatic(); 31 32 static const char *GetPluginDescriptionStatic(); 33 34 static lldb_private::DynamicLoader * 35 CreateInstance(lldb_private::Process *process, bool force); 36 37 //------------------------------------------------------------------ 38 /// Called after attaching a process. 39 /// 40 /// Allow DynamicLoader plug-ins to execute some code after 41 /// attaching to a process. 42 //------------------------------------------------------------------ 43 void DidAttach() override; 44 45 void DidLaunch() override; 46 47 lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread, 48 bool stop_others) override; 49 50 lldb_private::Status CanLoadImage() override; 51 52 //------------------------------------------------------------------ 53 // PluginInterface protocol 54 //------------------------------------------------------------------ 55 lldb_private::ConstString GetPluginName() override; 56 57 uint32_t GetPluginVersion() override; 58 59 private: 60 void LoadAllImagesAtFileAddresses(); 61 62 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderStatic); 63 }; 64 65 #endif // liblldb_DynamicLoaderStatic_h_ 66