Change Target::ReadMemoryFromFileCache to not read from the file
if the section is marked as encrypted. It will likely be readable in live memory. <rdar://problem/11305675> llvm-svn: 155509
This commit is contained in:
parent
cb93142e1f
commit
216d91f16e
|
@ -1064,6 +1064,11 @@ Target::ReadMemoryFromFileCache (const Address& addr, void *dst, size_t dst_len,
|
|||
SectionSP section_sp (addr.GetSection());
|
||||
if (section_sp)
|
||||
{
|
||||
// If the contents of this section are encrypted, the on-disk file is unusuable. Read only from live memory.
|
||||
if (section_sp->IsEncrypted())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
ModuleSP module_sp (section_sp->GetModule());
|
||||
if (module_sp)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue