From f044345c23c0324942b7375e7a09558267651523 Mon Sep 17 00:00:00 2001 From: "benchan@chromium.org" Date: Fri, 16 Dec 2011 16:42:59 +0000 Subject: Refactor code in preparation of merging with the fork in Chromium OS. This patch is part of a bigger patch that helps merging the breakpad code with the modified version in Chromium OS. Specifically, this patch makes the following changes: 1. Add a MemoryRange class for encapsulating and checking read access to a contiguous range of memory. 2. Add a MemoryMappedFile class for mapping a file into memory for read-only access. 3. Refactor other source code to use MemoryMappedFile. BUG=455 TEST=Tested the following: 1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6. 2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock). 3. All unit tests pass. 4. Run minidump-2-core to covnert a minidump file to a core file. Review URL: http://breakpad.appspot.com/332001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@895 4c0a9323-5329-0410-9bdc-e9ce6186880e --- Makefile.am | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index cfb57571..61921602 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -# Copyright (c) 2010, Google Inc. +# Copyright (c) 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -72,7 +72,8 @@ src_client_linux_libbreakpad_client_a_SOURCES = \ src/common/md5.cc \ src/common/string_conversion.cc \ src/common/linux/file_id.cc \ - src/common/linux/guid_creator.cc + src/common/linux/guid_creator.cc \ + src/common/linux/memory_mapped_file.cc endif LINUX_HOST if !DISABLE_PROCESSOR @@ -312,6 +313,7 @@ src_client_linux_linux_client_unittest_LDADD = \ src/common/md5.o \ src/common/linux/file_id.o \ src/common/linux/guid_creator.o \ + src/common/linux/memory_mapped_file.o \ src/common/string_conversion.o src_client_linux_linux_client_unittest_DEPENDENCIES = src/client/linux/linux_dumper_unittest_helper src/client/linux/libbreakpad_client.a src/libbreakpad.a @@ -331,9 +333,11 @@ src_tools_linux_dump_syms_dump_syms_SOURCES = \ src/common/linux/dump_symbols.cc \ src/common/linux/elf_symbols_to_module.cc \ src/common/linux/file_id.cc \ + src/common/linux/memory_mapped_file.cc \ src/tools/linux/dump_syms/dump_syms.cc src_tools_linux_md2core_minidump_2_core_SOURCES = \ + src/common/linux/memory_mapped_file.cc \ src/tools/linux/md2core/minidump-2-core.cc src_tools_linux_symupload_minidump_upload_SOURCES = \ @@ -355,6 +359,7 @@ src_common_dumper_unittest_SOURCES = \ src/common/dwarf_line_to_module.cc \ src/common/dwarf_line_to_module_unittest.cc \ src/common/language.cc \ + src/common/memory_range_unittest.cc \ src/common/module.cc \ src/common/module_unittest.cc \ src/common/stabs_reader.cc \ @@ -373,6 +378,8 @@ src_common_dumper_unittest_SOURCES = \ src/common/linux/dump_symbols_unittest.cc \ src/common/linux/elf_symbols_to_module.cc \ src/common/linux/elf_symbols_to_module_unittest.cc \ + src/common/linux/memory_mapped_file.cc \ + src/common/linux/memory_mapped_file_unittest.cc \ src/common/linux/synth_elf.cc \ src/common/linux/synth_elf_unittest.cc \ src/common/linux/file_id.cc \ -- cgit v1.2.1