diff options
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp index 08feda52f5c..8b1dd283394 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -410,12 +410,14 @@ DYLDRendezvous::ReadSOEntryFromMemory(lldb::addr_t addr, SOEntry &entry) if (!(addr = ReadPointer(addr, &entry.prev))) return false; - entry.file_spec.SetFile(ReadStringFromMemory(entry.path_addr), false); - - // The base_addr is not filled in for some case. - // Try to figure it out based on the load address of the object file. - // The issue observed for '/system/bin/linker' on Android L (5.0, 5.1) - if (entry.base_addr == 0) + std::string file_path = ReadStringFromMemory(entry.path_addr); + entry.file_spec.SetFile(file_path, false); + + // On Android L (5.0, 5.1) the load address of the "/system/bin/linker" isn't filled in + // correctly. To get the correct load address we fetch the load address of the file from the + // proc file system. + if (arch.GetTriple().getEnvironment() == llvm::Triple::Android && entry.base_addr == 0 && + (file_path == "/system/bin/linker" || file_path == "/system/bin/linker64")) { lldb::addr_t load_addr = LLDB_INVALID_ADDRESS; bool is_loaded = false; |