30 const llvm::Triple &triple_ref =
31 process->GetTarget().GetArchitecture().GetTriple();
32 const llvm::Triple::OSType os_type = triple_ref.getOS();
33 const llvm::Triple::ArchType arch_type = triple_ref.getArch();
34 if (os_type == llvm::Triple::UnknownOS) {
38 case llvm::Triple::hexagon:
39 case llvm::Triple::wasm32:
40 case llvm::Triple::wasm64:
49 Module *exe_module = process->GetTarget().GetExecutableModulePointer();
91 bool no_load_addresses =
true;
98 ObjectFile *image_object_file = module_sp->GetObjectFile();
99 if (image_object_file) {
102 const size_t num_sections = section_list->
GetSize();
103 for (
size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
108 no_load_addresses =
false;
115 if (no_load_addresses)
116 module_sp->SetLoadAddress(target, 0,
true , changed);
134 "can't load images on with a static debug session");
147 return "Dynamic loader plug-in that will load any images at the static "
148 "addresses contained in each image.";
#define LLDB_PLUGIN_DEFINE(PluginName)
static lldb_private::DynamicLoader * CreateInstance(lldb_private::Process *process, bool force)
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread, bool stop_others) override
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
void DidLaunch() override
Called after attaching a process.
DynamicLoaderStatic(lldb_private::Process *process)
void DidAttach() override
Called after attaching a process.
static llvm::StringRef GetPluginDescriptionStatic()
void LoadAllImagesAtFileAddresses()
lldb_private::Status CanLoadImage() override
Ask if it is ok to try and load or unload an shared library (image).
static llvm::StringRef GetPluginNameStatic()
A plug-in interface definition class for dynamic loaders.
Process * m_process
The process that this dynamic loader plug-in is tracking.
A collection class for Module objects.
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
ModuleIterable Modules() const
A class that describes an executable image and its associated object and symbol files.
virtual ObjectFile * GetObjectFile()
Get the object file representation for the current architecture.
A plug-in interface definition class for object file parsers.
virtual SectionList * GetSectionList(bool update_module_section_list=true)
Gets the section list for the currently selected architecture (and object for archives).
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A plug-in interface definition class for debugging a process.
void SetCanJIT(bool can_jit)
Sets whether executing JIT-compiled code in this process is possible.
Target & GetTarget()
Get the target object pointer for this module.
lldb::SectionSP GetSectionAtIndex(size_t idx) const
lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP §ion_sp) const
static Status FromErrorString(const char *str)
void ModulesDidLoad(ModuleList &module_list)
SectionLoadList & GetSectionLoadList()
const ModuleList & GetImages() const
Get accessor for the images for this process.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::Section > SectionSP
std::shared_ptr< lldb_private::Module > ModuleSP