diff options
Diffstat (limited to 'src/common/linux')
-rw-r--r-- | src/common/linux/dump_symbols.cc | 4 | ||||
-rw-r--r-- | src/common/linux/linux_libc_support_unittest.cc | 2 | ||||
-rw-r--r-- | src/common/linux/memory.h | 5 | ||||
-rw-r--r-- | src/common/linux/memory_unittest.cc | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index 64fcb34b..a7888189 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -52,10 +52,8 @@ #include "common/linux/dump_symbols.h" #include "common/linux/file_id.h" -#include "common/linux/guid_creator.h" #include "common/linux/module.h" #include "common/linux/stabs_reader.h" -#include "processor/scoped_ptr.h" // This namespace contains helper functions. namespace { @@ -82,7 +80,7 @@ static std::string Demangle(const std::string &mangled) { // Fix offset into virtual address by adding the mapped base into offsets. // Make life easier when want to find something by offset. static void FixAddress(void *obj_base) { - ElfW(Word) base = reinterpret_cast<ElfW(Word)>(obj_base); + ElfW(Addr) base = reinterpret_cast<ElfW(Addr)>(obj_base); ElfW(Ehdr) *elf_header = static_cast<ElfW(Ehdr) *>(obj_base); elf_header->e_phoff += base; elf_header->e_shoff += base; diff --git a/src/common/linux/linux_libc_support_unittest.cc b/src/common/linux/linux_libc_support_unittest.cc index 3b5d6114..d3907e94 100644 --- a/src/common/linux/linux_libc_support_unittest.cc +++ b/src/common/linux/linux_libc_support_unittest.cc @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "breakpad/linux/linux_libc_support.h" +#include "common/linux/linux_libc_support.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/src/common/linux/memory.h b/src/common/linux/memory.h index 7cae40ef..f10a194b 100644 --- a/src/common/linux/memory.h +++ b/src/common/linux/memory.h @@ -86,8 +86,13 @@ class PageAllocator { private: uint8_t *GetNPages(unsigned num_pages) { +#ifdef __x86_64 + void *a = sys_mmap(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); +#else void *a = sys_mmap2(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); +#endif if (a == MAP_FAILED) return NULL; diff --git a/src/common/linux/memory_unittest.cc b/src/common/linux/memory_unittest.cc index 22b64398..66c83465 100644 --- a/src/common/linux/memory_unittest.cc +++ b/src/common/linux/memory_unittest.cc @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "breakpad/linux/memory.h" +#include "common/linux/memory.h" #include "testing/gtest/include/gtest/gtest.h" using namespace google_breakpad; |