diff options
| author | Jason Molenda <jmolenda@apple.com> | 2012-04-25 00:06:56 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2012-04-25 00:06:56 +0000 |
| commit | 216d91f16e9f64146302fafdb2eedca8d91835c3 (patch) | |
| tree | 8338eebbccec265e162a8da9c6c890442b200a85 | |
| parent | cb93142e1fb8f064172a2ea4fc665c924c0ae6a9 (diff) | |
| download | bcm5719-llvm-216d91f16e9f64146302fafdb2eedca8d91835c3.tar.gz bcm5719-llvm-216d91f16e9f64146302fafdb2eedca8d91835c3.zip | |
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
| -rw-r--r-- | lldb/source/Target/Target.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 6671a765e0b..ef187da557a 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -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) { |

