LLDB  mainline
DynamicLoaderWindowsDYLD.h
Go to the documentation of this file.
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 
13 #include "lldb/lldb-forward.h"
14 
15 #include <map>
16 
17 namespace lldb_private {
18 
20 public:
22 
23  ~DynamicLoaderWindowsDYLD() override;
24 
25  static void Initialize();
26  static void Terminate();
27  static llvm::StringRef GetPluginNameStatic() { return "windows-dyld"; }
28  static llvm::StringRef 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  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
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 // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_DYNAMICLOADERWINDOWSDYLD_H
lldb_private::DynamicLoaderWindowsDYLD::DidLaunch
void DidLaunch() override
Called after launching a process.
Definition: DynamicLoaderWindowsDYLD.cpp:150
lldb_private::Process
Definition: Process.h:338
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::DynamicLoaderWindowsDYLD::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: DynamicLoaderWindowsDYLD.h:27
lldb_private::DynamicLoaderWindowsDYLD::~DynamicLoaderWindowsDYLD
~DynamicLoaderWindowsDYLD() override
lldb_private::DynamicLoaderWindowsDYLD::GetLoadAddress
lldb::addr_t GetLoadAddress(lldb::ModuleSP executable)
Definition: DynamicLoaderWindowsDYLD.cpp:97
lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule
void OnLoadModule(lldb::ModuleSP module_sp, const ModuleSpec module_spec, lldb::addr_t module_addr)
Definition: DynamicLoaderWindowsDYLD.cpp:62
lldb_private::Thread
Definition: Thread.h:61
lldb_private::DynamicLoaderWindowsDYLD::m_loaded_modules
std::map< lldb::ModuleSP, lldb::addr_t > m_loaded_modules
Definition: DynamicLoaderWindowsDYLD.h:48
lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule
void OnUnloadModule(lldb::addr_t module_addr)
Definition: DynamicLoaderWindowsDYLD.cpp:82
lldb_private::DynamicLoaderWindowsDYLD::Initialize
static void Initialize()
Definition: DynamicLoaderWindowsDYLD.cpp:34
lldb_private::DynamicLoader
Definition: DynamicLoader.h:52
lldb_private::DynamicLoaderWindowsDYLD::CanLoadImage
Status CanLoadImage() override
Ask if it is ok to try and load or unload an shared library (image).
Definition: DynamicLoaderWindowsDYLD.cpp:171
lldb_private::DynamicLoaderWindowsDYLD::GetPluginName
llvm::StringRef GetPluginName() override
Definition: DynamicLoaderWindowsDYLD.h:42
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::Status
Definition: Status.h:44
lldb_private::DynamicLoaderWindowsDYLD::CreateInstance
static DynamicLoader * CreateInstance(Process *process, bool force)
Definition: DynamicLoaderWindowsDYLD.cpp:46
lldb_private::DynamicLoaderWindowsDYLD::DidAttach
void DidAttach() override
Called after attaching a process.
Definition: DynamicLoaderWindowsDYLD.cpp:120
lldb-forward.h
lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, bool stop) override
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
Definition: DynamicLoaderWindowsDYLD.cpp:174
lldb_private::DynamicLoaderWindowsDYLD::Terminate
static void Terminate()
Definition: DynamicLoaderWindowsDYLD.cpp:39
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::DynamicLoaderWindowsDYLD
Definition: DynamicLoaderWindowsDYLD.h:19
DynamicLoader.h
lldb_private::DynamicLoaderWindowsDYLD::DynamicLoaderWindowsDYLD
DynamicLoaderWindowsDYLD(Process *process)
Definition: DynamicLoaderWindowsDYLD.cpp:29
lldb_private::DynamicLoaderWindowsDYLD::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: DynamicLoaderWindowsDYLD.cpp:41