LLDB  mainline
DynamicLoaderWasmDYLD.h
Go to the documentation of this file.
1 //===-- DynamicLoaderWasmDYLD.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_DynamicLoaderWasmDYLD_h_
10 #define liblldb_Plugins_DynamicLoaderWasmDYLD_h_
11 
13 
14 namespace lldb_private {
15 namespace wasm {
16 
18 public:
20 
21  static void Initialize();
22  static void Terminate() {}
23 
24  static llvm::StringRef GetPluginNameStatic() { return "wasm-dyld"; }
25  static llvm::StringRef GetPluginDescriptionStatic();
26 
27  static DynamicLoader *CreateInstance(Process *process, bool force);
28 
29  /// DynamicLoader
30  /// \{
31  void DidAttach() override;
32  void DidLaunch() override {}
33  Status CanLoadImage() override { return Status(); }
34  lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
35  bool stop) override;
36  lldb::ModuleSP LoadModuleAtAddress(const lldb_private::FileSpec &file,
37  lldb::addr_t link_map_addr,
38  lldb::addr_t base_addr,
39  bool base_addr_is_offset) override;
40 
41  /// \}
42 
43  /// PluginInterface protocol.
44  /// \{
45  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
46  /// \}
47 };
48 
49 } // namespace wasm
50 } // namespace lldb_private
51 
52 #endif // liblldb_Plugins_DynamicLoaderWasmDYLD_h_
lldb_private::wasm::DynamicLoaderWasmDYLD::DynamicLoaderWasmDYLD
DynamicLoaderWasmDYLD(Process *process)
Definition: DynamicLoaderWasmDYLD.cpp:26
lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress
lldb::ModuleSP LoadModuleAtAddress(const lldb_private::FileSpec &file, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset) override
Locates or creates a module given by file and updates/loads the resulting module at the virtual base ...
Definition: DynamicLoaderWasmDYLD.cpp:68
lldb_private::wasm::DynamicLoaderWasmDYLD::DidLaunch
void DidLaunch() override
Called after launching a process.
Definition: DynamicLoaderWasmDYLD.h:32
lldb_private::wasm::DynamicLoaderWasmDYLD::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: DynamicLoaderWasmDYLD.cpp:34
lldb_private::Process
Definition: Process.h:338
lldb_private::wasm::DynamicLoaderWasmDYLD::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: DynamicLoaderWasmDYLD.h:24
lldb_private::wasm::DynamicLoaderWasmDYLD::GetPluginName
llvm::StringRef GetPluginName() override
PluginInterface protocol.
Definition: DynamicLoaderWasmDYLD.h:45
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::wasm::DynamicLoaderWasmDYLD::Terminate
static void Terminate()
Definition: DynamicLoaderWasmDYLD.h:22
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance
static DynamicLoader * CreateInstance(Process *process, bool force)
Definition: DynamicLoaderWasmDYLD.cpp:39
lldb_private::Thread
Definition: Thread.h:61
lldb_private::DynamicLoader
Definition: DynamicLoader.h:52
lldb_private::wasm::DynamicLoaderWasmDYLD::CanLoadImage
Status CanLoadImage() override
Ask if it is ok to try and load or unload an shared library (image).
Definition: DynamicLoaderWasmDYLD.h:33
lldb_private::Status
Definition: Status.h:44
lldb_private::wasm::DynamicLoaderWasmDYLD::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: DynamicLoaderWasmDYLD.cpp:63
lldb_private::wasm::DynamicLoaderWasmDYLD::Initialize
static void Initialize()
Definition: DynamicLoaderWasmDYLD.cpp:29
lldb_private::wasm::DynamicLoaderWasmDYLD
Definition: DynamicLoaderWasmDYLD.h:17
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::wasm::DynamicLoaderWasmDYLD::DidAttach
void DidAttach() override
DynamicLoader.
Definition: DynamicLoaderWasmDYLD.cpp:54
DynamicLoader.h