<rdar://problem/13198767>
authorGreg Clayton <gclayton@apple.com>
Thu, 14 Feb 2013 03:26:35 +0000 (03:26 +0000)
committerGreg Clayton <gclayton@apple.com>
Thu, 14 Feb 2013 03:26:35 +0000 (03:26 +0000)
When dumping instructions, resolve the address specified as a file address if the target doesn't have anything loaded.

llvm-svn: 175131

lldb/source/Core/DataExtractor.cpp

index eb63670..bc4b47b 100644 (file)
@@ -1339,7 +1339,8 @@ DataExtractor::Dump (Stream *s,
                 lldb_private::Address so_addr;
                 if (!target_sp->GetSectionLoadList().ResolveLoadAddress(addr, so_addr))
                 {
-                    so_addr.SetRawAddress(addr);
+                    if (target_sp->GetSectionLoadList().IsEmpty() || !target_sp->GetImages().ResolveFileAddress(addr, so_addr))
+                        so_addr.SetRawAddress(addr);
                 }
 
                 size_t bytes_consumed = disassembler_sp->DecodeInstructions (so_addr, *this, start_offset, item_count, false);