Support mips shared object debug info
MIPS's .dyanamic section is read-only. Instead of using DT_DEBUG for
the pointer to dyld information it uses a separate tag DT_MIPS_RLD_MAP
which points to storage in the read-write .rld_map section, which in
turn points to the dyld information.
Review: http://llvm-reviews.chandlerc.com/D1890
llvm-svn: 192408
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index b46c937..a151101 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -289,12 +289,24 @@
{
Target *target = &GetTarget();
ObjectFile *obj_file = target->GetExecutableModule()->GetObjectFile();
- Address addr = obj_file->GetImageInfoAddress();
+ bool indirect;
+ Address addr = obj_file->GetImageInfoAddress(indirect);
- if (addr.IsValid())
- return addr.GetLoadAddress(target);
- else
- return LLDB_INVALID_ADDRESS;
+ if (addr.IsValid())
+ {
+ if (indirect)
+ {
+ Address ind_addr;
+ Error error;
+ if (target->ReadPointerFromMemory(addr.GetLoadAddress(target), false, error, ind_addr))
+ return ind_addr.GetLoadAddress(target);
+ }
+ else
+ {
+ return addr.GetLoadAddress(target);
+ }
+ }
+ return LLDB_INVALID_ADDRESS;
}
Error