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

Unified Diff: snapshot/mac/mach_o_image_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_reader.h ('k') | snapshot/mac/mach_o_image_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_reader.cc
diff --git a/util/mac/mach_o_image_reader.cc b/snapshot/mac/mach_o_image_reader.cc
similarity index 98%
rename from util/mac/mach_o_image_reader.cc
rename to snapshot/mac/mach_o_image_reader.cc
index f911ec67e465b2285efb5da892a2d91fe616c99f..65dd3946be5bbd2aba9c0b940052c3d8f7ce761d 100644
--- a/util/mac/mach_o_image_reader.cc
+++ b/snapshot/mac/mach_o_image_reader.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/mac/mach_o_image_reader.h"
+#include "snapshot/mac/mach_o_image_reader.h"
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
@@ -23,10 +23,10 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "snapshot/mac/mach_o_image_segment_reader.h"
+#include "snapshot/mac/mach_o_image_symbol_table_reader.h"
+#include "snapshot/mac/process_reader.h"
#include "util/mac/checked_mach_address_range.h"
-#include "util/mac/mach_o_image_segment_reader.h"
-#include "util/mac/mach_o_image_symbol_table_reader.h"
-#include "util/mac/process_reader.h"
namespace {
@@ -267,7 +267,7 @@ bool MachOImageReader::Initialize(ProcessReader* process_reader,
mach_vm_address_t slid_segment_address = segment->Address();
mach_vm_size_t slid_segment_size = segment->Size();
CheckedMachAddressRange slid_segment_range(
- process_reader_, slid_segment_address, slid_segment_size);
+ process_reader_->Is64Bit(), slid_segment_address, slid_segment_size);
if (!slid_segment_range.IsValid()) {
LOG(WARNING) << base::StringPrintf(
"invalid slid segment range 0x%llx + 0x%llx, "
@@ -415,7 +415,7 @@ bool MachOImageReader::LookUpExternalDefinedSymbol(
// to slide. In non-PIE executables, __mh_execute_header is an absolute
// symbol.
CheckedMachAddressRange section_range(
- process_reader_, section_address, section->size);
+ process_reader_->Is64Bit(), section_address, section->size);
if (!section_range.ContainsValue(slid_value) &&
!(symbol_info->section == 1 && segment->Name() == SEG_TEXT &&
slid_value == Address())) {
« no previous file with comments | « snapshot/mac/mach_o_image_reader.h ('k') | snapshot/mac/mach_o_image_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698