OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 594 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
595 return memory_info_; | 595 return memory_info_; |
596 } | 596 } |
597 | 597 |
598 std::vector<CheckedRange<WinVMAddress, WinVMSize>> | 598 std::vector<CheckedRange<WinVMAddress, WinVMSize>> |
599 ProcessInfo::GetReadableRanges( | 599 ProcessInfo::GetReadableRanges( |
600 const CheckedRange<WinVMAddress, WinVMSize>& range) const { | 600 const CheckedRange<WinVMAddress, WinVMSize>& range) const { |
601 return GetReadableRangesOfMemoryMap(range, MemoryInfo()); | 601 return GetReadableRangesOfMemoryMap(range, MemoryInfo()); |
602 } | 602 } |
603 | 603 |
604 const std::vector<ProcessInfo::Handle>& ProcessInfo::Handles() { | 604 const std::vector<ProcessInfo::Handle>& ProcessInfo::Handles() const { |
605 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 605 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
606 if (handles_.empty()) | 606 if (handles_.empty()) |
607 handles_ = BuildHandleVector(process_); | 607 handles_ = BuildHandleVector(process_); |
608 return handles_; | 608 return handles_; |
609 } | 609 } |
610 | 610 |
611 std::vector<CheckedRange<WinVMAddress, WinVMSize>> GetReadableRangesOfMemoryMap( | 611 std::vector<CheckedRange<WinVMAddress, WinVMSize>> GetReadableRangesOfMemoryMap( |
612 const CheckedRange<WinVMAddress, WinVMSize>& range, | 612 const CheckedRange<WinVMAddress, WinVMSize>& range, |
613 const std::vector<MEMORY_BASIC_INFORMATION64>& memory_info) { | 613 const std::vector<MEMORY_BASIC_INFORMATION64>& memory_info) { |
614 using Range = CheckedRange<WinVMAddress, WinVMSize>; | 614 using Range = CheckedRange<WinVMAddress, WinVMSize>; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } else { | 664 } else { |
665 result.push_back(as_ranges[i]); | 665 result.push_back(as_ranges[i]); |
666 } | 666 } |
667 DCHECK(result.back().IsValid()); | 667 DCHECK(result.back().IsValid()); |
668 } | 668 } |
669 | 669 |
670 return result; | 670 return result; |
671 } | 671 } |
672 | 672 |
673 } // namespace crashpad | 673 } // namespace crashpad |
OLD | NEW |