Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Unified Diff: snapshot/mac/mach_o_image_segment_reader.cc

Issue 666483002: Create snapshot/mac and move some files from snapshot and util to there (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad/+/master
Patch Set: Move process_reader, process_types, and mach_o_image*_reader from util/mac to snapshot/mac Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/mac/mach_o_image_segment_reader.h ('k') | snapshot/mac/mach_o_image_segment_reader_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/mac/mach_o_image_segment_reader.cc
diff --git a/util/mac/mach_o_image_segment_reader.cc b/snapshot/mac/mach_o_image_segment_reader.cc
similarity index 96%
rename from util/mac/mach_o_image_segment_reader.cc
rename to snapshot/mac/mach_o_image_segment_reader.cc
index 58f850639676c3ece904e827d20024d856430052..697822296bacbeb427c15976ae55136cfb5c6efb 100644
--- a/util/mac/mach_o_image_segment_reader.cc
+++ b/snapshot/mac/mach_o_image_segment_reader.cc
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/mac/mach_o_image_segment_reader.h"
+#include "snapshot/mac/mach_o_image_segment_reader.h"
#include <mach-o/loader.h>
#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "snapshot/mac/process_reader.h"
#include "util/mac/checked_mach_address_range.h"
-#include "util/mac/process_reader.h"
#include "util/stdlib/strnlen.h"
namespace crashpad {
@@ -79,8 +79,9 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
// This checks the unslid segment range. The slid range (as loaded into
// memory) will be checked later by MachOImageReader.
- CheckedMachAddressRange segment_range(
- process_reader, segment_command_.vmaddr, segment_command_.vmsize);
+ CheckedMachAddressRange segment_range(process_reader->Is64Bit(),
+ segment_command_.vmaddr,
+ segment_command_.vmsize);
if (!segment_range.IsValid()) {
LOG(WARNING) << base::StringPrintf("invalid segment range 0x%llx + 0x%llx",
segment_command_.vmaddr,
@@ -120,7 +121,7 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
}
CheckedMachAddressRange section_range(
- process_reader, section.addr, section.size);
+ process_reader->Is64Bit(), section.addr, section.size);
if (!section_range.IsValid()) {
LOG(WARNING) << base::StringPrintf(
"invalid section range 0x%llx + 0x%llx",
« no previous file with comments | « snapshot/mac/mach_o_image_segment_reader.h ('k') | snapshot/mac/mach_o_image_segment_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698