Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h
39653 views
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 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
54
55