1 //===-- DynamicLoaderWindowsDYLD.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_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_ 10 #define liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_ 11 12 #include "lldb/Target/DynamicLoader.h" 13 #include "lldb/lldb-forward.h" 14 15 #include <map> 16 17 namespace lldb_private { 18 19 class DynamicLoaderWindowsDYLD : public DynamicLoader { 20 public: 21 DynamicLoaderWindowsDYLD(Process *process); 22 23 ~DynamicLoaderWindowsDYLD() override; 24 25 static void Initialize(); 26 static void Terminate(); 27 static ConstString GetPluginNameStatic(); 28 static const char *GetPluginDescriptionStatic(); 29 30 static DynamicLoader *CreateInstance(Process *process, bool force); 31 32 void OnLoadModule(const ModuleSpec &module_spec, lldb::addr_t module_addr); 33 void OnUnloadModule(lldb::addr_t module_addr); 34 35 void DidAttach() override; 36 void DidLaunch() override; 37 Status CanLoadImage() override; 38 lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, 39 bool stop) override; 40 41 ConstString GetPluginName() override; 42 uint32_t GetPluginVersion() override; 43 44 protected: 45 lldb::addr_t GetLoadAddress(lldb::ModuleSP executable); 46 47 private: 48 std::map<lldb::ModuleSP, lldb::addr_t> m_loaded_modules; 49 }; 50 51 } // namespace lldb_private 52 53 #endif // liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_ 54