From 6b3e6d54871f02cdaca323a80051f2d744b39b76 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 12 Sep 2013 23:23:35 +0000 Subject: Disassembler::DisassembleRange() currently calls Target::ReadMemory with prefer_file_cache == false. This is what we want to do when the user is doing a disassemble command -- show the actual memory contents in case the memory has been corrupted or something -- but when we're profiling functions for stepping or unwinding (ThreadPlanStepRange::GetInstructionsForAddress, UnwindAssemblyInstEmulation::GetNonCallSiteUnwindP) we can read __TEXT instructions directly out of the file, if it exists. llvm-svn: 190638 --- lldb/source/Core/Disassembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Core/Disassembler.cpp') diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index e80e92c91b5..90c4f0441a6 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -235,7 +235,8 @@ Disassembler::DisassembleRange const char *plugin_name, const char *flavor, const ExecutionContext &exe_ctx, - const AddressRange &range + const AddressRange &range, + bool prefer_file_cache ) { lldb::DisassemblerSP disasm_sp; @@ -245,7 +246,6 @@ Disassembler::DisassembleRange if (disasm_sp) { - const bool prefer_file_cache = false; size_t bytes_disassembled = disasm_sp->ParseInstructions (&exe_ctx, range, NULL, prefer_file_cache); if (bytes_disassembled == 0) disasm_sp.reset(); -- cgit v1.2.3