Index: util/win/process_info.cc |
diff --git a/util/win/process_info.cc b/util/win/process_info.cc |
index 7f3ff286c1dd0e6cf4c209407707b563a5327076..1478d044a9fe2171da4b0c0565502b2224092874 100644 |
--- a/util/win/process_info.cc |
+++ b/util/win/process_info.cc |
@@ -600,6 +600,26 @@ ProcessInfo::GetReadableRanges( |
return GetReadableRangesOfMemoryMap(range, MemoryInfo()); |
} |
+bool ProcessInfo::LoggingRangeIsFullyReadable( |
+ const CheckedRange<WinVMAddress, WinVMSize>& range) const { |
+ const auto ranges = GetReadableRanges(range); |
+ if (ranges.size() != 1) { |
+ LOG(ERROR) << base::StringPrintf( |
+ "range at 0x%llx, size 0x%llx fully unreadable", |
+ range.base(), |
+ range.size()); |
+ return false; |
+ } |
+ if (ranges[0].base() != range.base() || ranges[0].size() != range.size()) { |
+ LOG(ERROR) << base::StringPrintf( |
+ "some of range at 0x%llx, size 0x%llx unreadable", |
+ range.base(), |
+ range.size()); |
+ return false; |
+ } |
+ return true; |
+} |
+ |
const std::vector<ProcessInfo::Handle>& ProcessInfo::Handles() const { |
INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
if (handles_.empty()) |