HomePhabricator

Change Target::ReadMemory to ensure the amount of memory read from the file…

Authored by augusto2112 on May 11 2021, 9:07 AM.

Description

Change Target::ReadMemory to ensure the amount of memory read from the file-cache is the amount requested.

This change ensures that if for whatever reason we read less bytes than expected (for example, when trying to read memory that spans multiple sections), we try reading from the live process as well.

Reviewed By: jasonmolenda

Differential Revision: https://reviews.llvm.org/D101390