mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 23:31:50 +08:00
Target::ReadMemory read from read-only binary file Section, not memory
Commiting this patch for Augusto Noronha who is getting set up still. This patch changes Target::ReadMemory so the default behavior when a read is in a Section that is read-only is to fetch the data from the local binary image, instead of reading it from memory. Update all callers to use their old preferences (the old prefer_file_cache bool) using the new API; we should revisit these calls and see if they really intend to read live memory, or if reading from a read-only Section would be equivalent and important for performance-sensitive cases. rdar://30634422 Differential revision: https://reviews.llvm.org/D100338
This commit is contained in:
@@ -264,10 +264,9 @@ InstructionList *ThreadPlanStepRange::GetInstructionsForAddress(
|
||||
// Disassemble the address range given:
|
||||
const char *plugin_name = nullptr;
|
||||
const char *flavor = nullptr;
|
||||
const bool prefer_file_cache = true;
|
||||
m_instruction_ranges[i] = Disassembler::DisassembleRange(
|
||||
GetTarget().GetArchitecture(), plugin_name, flavor, GetTarget(),
|
||||
m_address_ranges[i], prefer_file_cache);
|
||||
m_address_ranges[i]);
|
||||
}
|
||||
if (!m_instruction_ranges[i])
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user