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();
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  llvm::StringRef GetPluginName() override {
44  }
45 
46 protected:
47  lldb::addr_t GetLoadAddress(lldb::ModuleSP executable);
48 
49 private:
50  std::map<lldb::ModuleSP, lldb::addr_t> m_loaded_modules;
51 };
52 
53 } // namespace lldb_private
54 
55 #endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_DYNAMICLOADERWINDOWSDYLD_H
lldb_private::DynamicLoaderWindowsDYLD::DidLaunch
void DidLaunch() override
Called after launching a process.
Definition: DynamicLoaderWindowsDYLD.cpp:154
lldb_private::Process
Definition: Process.h:340
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::DynamicLoaderWindowsDYLD::~DynamicLoaderWindowsDYLD
~DynamicLoaderWindowsDYLD() override
lldb_private::DynamicLoaderWindowsDYLD::GetPluginDescriptionStatic
static const char * GetPluginDescriptionStatic()
Definition: DynamicLoaderWindowsDYLD.cpp:45
lldb_private::DynamicLoaderWindowsDYLD::GetLoadAddress
lldb::addr_t GetLoadAddress(lldb::ModuleSP executable)
Definition: DynamicLoaderWindowsDYLD.cpp:101
lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule
void OnLoadModule(lldb::ModuleSP module_sp, const ModuleSpec module_spec, lldb::addr_t module_addr)
Definition: DynamicLoaderWindowsDYLD.cpp:66
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:202
lldb_private::Thread
Definition: Thread.h:60
lldb_private::DynamicLoaderWindowsDYLD::m_loaded_modules
std::map< lldb::ModuleSP, lldb::addr_t > m_loaded_modules
Definition: DynamicLoaderWindowsDYLD.h:50
lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule
void OnUnloadModule(lldb::addr_t module_addr)
Definition: DynamicLoaderWindowsDYLD.cpp:86
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::DynamicLoaderWindowsDYLD::Initialize
static void Initialize()
Definition: DynamicLoaderWindowsDYLD.cpp:33
lldb_private::DynamicLoaderWindowsDYLD::GetPluginNameStatic
static ConstString GetPluginNameStatic()
Definition: DynamicLoaderWindowsDYLD.cpp:40
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:175
lldb_private::DynamicLoaderWindowsDYLD::GetPluginName
llvm::StringRef GetPluginName() override
Definition: DynamicLoaderWindowsDYLD.h:42
lldb_private::ModuleSpec
Definition: ModuleSpec.h:26
lldb_private::Status
Definition: Status.h:44
lldb_private::DynamicLoaderWindowsDYLD::CreateInstance
static DynamicLoader * CreateInstance(Process *process, bool force)
Definition: DynamicLoaderWindowsDYLD.cpp:50
lldb_private::DynamicLoaderWindowsDYLD::DidAttach
void DidAttach() override
Called after attaching a process.
Definition: DynamicLoaderWindowsDYLD.cpp:124
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:178
lldb_private::DynamicLoaderWindowsDYLD::Terminate
static void Terminate()
Definition: DynamicLoaderWindowsDYLD.cpp:38
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:28