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 LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_DYNAMICLOADERWINDOWSDYLD_H 10 #define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_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(lldb::ModuleSP module_sp, const ModuleSpec module_spec, 33 lldb::addr_t module_addr); 34 void OnUnloadModule(lldb::addr_t module_addr); 35 36 void DidAttach() override; 37 void DidLaunch() override; 38 Status CanLoadImage() override; 39 lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, 40 bool stop) override; 41 42 ConstString GetPluginName() override; 43 uint32_t GetPluginVersion() override; 44 45 protected: 46 lldb::addr_t GetLoadAddress(lldb::ModuleSP executable); 47 48 private: 49 std::map<lldb::ModuleSP, lldb::addr_t> m_loaded_modules; 50 }; 51 52 } // namespace lldb_private 53 54 #endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_DYNAMICLOADERWINDOWSDYLD_H 55