Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4821,6 +4821,25 @@ { module_sp->SetLoadAddress (target, base_addr, value_is_offset, changed); } + else + { + if (value_is_offset) + { + // Try to fetch the load address of the file from the process as we need absolute load + // address to read the file out of the memory instead of a load bias. + bool is_loaded; + lldb::addr_t load_addr; + Error error = GetFileLoadAddress (file, is_loaded, load_addr); + if (error.Success() && is_loaded) + base_addr = load_addr; + } + + if ((module_sp = ReadModuleFromMemory (file, base_addr))) + { + module_sp->SetLoadAddress (target, base_addr, false, changed); + target.GetImages().AppendIfNeeded (module_sp); + } + } return module_sp; }