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 LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H 10#define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_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 17class DynamicLoaderStatic : public lldb_private::DynamicLoader { 18public: 19 DynamicLoaderStatic(lldb_private::Process *process); 20 21 ~DynamicLoaderStatic() override; 22 23 // Static Functions 24 static void Initialize(); 25 26 static void Terminate(); 27 28 static lldb_private::ConstString GetPluginNameStatic(); 29 30 static const char *GetPluginDescriptionStatic(); 31 32 static lldb_private::DynamicLoader * 33 CreateInstance(lldb_private::Process *process, bool force); 34 35 /// Called after attaching a process. 36 /// 37 /// Allow DynamicLoader plug-ins to execute some code after 38 /// attaching to a process. 39 void DidAttach() override; 40 41 void DidLaunch() override; 42 43 lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread, 44 bool stop_others) override; 45 46 lldb_private::Status CanLoadImage() override; 47 48 // PluginInterface protocol 49 lldb_private::ConstString GetPluginName() override; 50 51 uint32_t GetPluginVersion() override; 52 53private: 54 void LoadAllImagesAtFileAddresses(); 55 56 DynamicLoaderStatic(const DynamicLoaderStatic &) = delete; 57 const DynamicLoaderStatic &operator=(const DynamicLoaderStatic &) = delete; 58}; 59 60#endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H 61