[all-commits] [llvm/llvm-project] e9fe78: Target::ReadMemory read from read-only binary file...

Jason Molenda via All-commits all-commits at lists.llvm.org
Fri Apr 16 16:13:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9fe788d326090cb6155c0dec90b44c932273dd3
      https://github.com/llvm/llvm-project/commit/e9fe788d326090cb6155c0dec90b44c932273dd3
  Author: Jason Molenda <jason at molenda.com>
  Date:   2021-04-16 (Fri, 16 Apr 2021)

  Changed paths:
    M lldb/include/lldb/Core/Disassembler.h
    M lldb/include/lldb/Symbol/Function.h
    M lldb/include/lldb/Target/Target.h
    M lldb/source/API/SBFunction.cpp
    M lldb/source/API/SBSymbol.cpp
    M lldb/source/API/SBTarget.cpp
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Core/Address.cpp
    M lldb/source/Core/Disassembler.cpp
    M lldb/source/Core/IOHandlerCursesGUI.cpp
    M lldb/source/Core/Value.cpp
    M lldb/source/Core/ValueObject.cpp
    M lldb/source/Expression/IRMemoryMap.cpp
    M lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
    M lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
    M lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
    M lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
    M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    M lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
    M lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
    M lldb/source/Symbol/Function.cpp
    M lldb/source/Symbol/Symbol.cpp
    M lldb/source/Target/Process.cpp
    M lldb/source/Target/StackFrame.cpp
    M lldb/source/Target/Target.cpp
    M lldb/source/Target/ThreadPlanStepRange.cpp
    M lldb/source/Target/Trace.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list