aboutsummaryrefslogtreecommitdiff
path: root/src/common/memory.h
Commit message (Collapse)AuthorAgeFilesLines
* linux-syscall-support: pull in latest versionMike Frysinger2016-06-141-7/+0
| | | | | | | | | The sys_mmap/sys_mmap2 weirdness has been cleaned up in lss now and there is only one API now for everyone -- sys_mmap. R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/2065493006 .
* Switch the Linux minidump writer to use MDCVInfoELF for CV data.Ted Mielczarek2016-04-051-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | This preserves full build ids in minidumps, which are useful for tracking down the right version of system libraries from Linux distributions. The default build id produced by GNU binutils' ld is a 160-bit SHA-1 hash of some parts of the binary, which is exactly 20 bytes: https://sourceware.org/binutils/docs-2.26/ld/Options.html#index-g_t_002d_002dbuild_002did-292 The bulk of the changes here are to change the signatures of the FileID methods to use a wasteful_vector instead of raw pointers, since build ids can be of arbitrary length. The previous change that added support for this in the processor code preserved the return value of `Minidump::debug_identifier()` as the current `GUID+age` treatment for backwards-compatibility, and exposed the full build id from `Minidump::code_identifier()`, which was previously stubbed out for Linux dumps. This change keeps the debug ID in the `dump_syms` output the same to match. R=mark@chromium.org, thestig@chromium.org BUG= Review URL: https://codereview.chromium.org/1688743002 .
* MIPS64: Initial MIPS64 related change.mark@chromium.org2015-04-151-1/+2
| | | | | | | | | | | With this change Breakpad can be compiled for MIPS64, but it is not yet functional. Patch by Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com> Review URL: https://breakpad.appspot.com/6824002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1446 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Annotate PageAllocator for MSan.mark@chromium.org2014-07-221-0/+10
| | | | | | | | | | | | | | | PageAllocator maps memory via sys_mmap(), implemented in linux_syscall_support.h. We need to explicitly inform MSan that this memory is initialized. Patch by Sergey Matveev <earthdok@chromium.org> BUG=chromium:394028 Review URL: https://breakpad.appspot.com/2744002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1356 4c0a9323-5329-0410-9bdc-e9ce6186880e
* First cut at adding arm64 Linux / Android support to Breakpad.rmcilroy@chromium.org2014-04-021-1/+1
| | | | | | | | | | | | | | This is an initial attempt to add Arm64 (aarch64) support to Breakpad for Linux / Android platforms. This CL adds the Arm64 data structures, but does not yet implement the Android getcontext support or CPUFillFromThreadInfo / CPUFillFromUContext. BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1354002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1301 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing compiler warnings:ivan.penkov@gmail.com2014-02-281-2/+2
| | | | | | | | | | | | - Building Breakpad in Xcode with arm64 architecture. - iOS Patches provided by: Ian Hickson and Greg Vance. R=mark@chromium.org Review URL: https://breakpad.appspot.com/1184003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1286 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS.dmaclach2014-02-181-4/+4
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1281 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix build on Android.mark@chromium.org2013-06-281-0/+5
| | | | | | | | Patch by Nico Weber <thakis@chromium.org> Review URL: https://breakpad.appspot.com/609002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1197 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Eliminate redundant initialization following r1188,mark@chromium.org2013-06-201-2/+1
| | | | | | | | | | https://breakpad.appspot.com/599002 R=ivan.penkov@gmail.com Review URL: https://breakpad.appspot.com/604002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1192 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Thanks to Matthew Riley who noticed this issue and provided the initial ↵ivan.penkov@gmail.com2013-05-231-12/+28
| | | | | | | | | | | | proposal for the fix. There's a bug in the new allocator<T> implementation used by wasteful_vector. It inherits the base class' implementation of allocator and doesn't implement allocate() so it goes to the heap instead of the PageAllocator -- the very thing wasteful_vector was trying to avoid! As a side effect it was also leaking heap memory. Thanks, -Ivan Review URL: https://breakpad.appspot.com/599002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1188 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use std::vector with a custom allocator wrapping PageAllocator for ↵ted.mielczarek@gmail.com2013-05-171-70/+29
| | | | | | | | wasteful_vector Patch by Mike Hommey <mh@glandium.org>, R=me at https://breakpad.appspot.com/581002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1184 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing a clang warning.ivan.penkov@gmail.com2013-04-251-1/+3
| | | | | | | | | | | | This is a followup change from https://breakpad.appspot.com/569002/ This prevents push_back from ever calling Realloc() with 0 (which could happen if wasteful_vector was constructed with size_hint set to 0, causing allocated_ to be 0. Review URL: https://breakpad.appspot.com/576002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1166 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix Clang warning regarding null pointer argument.ivan.penkov@gmail.com2013-04-241-1/+3
| | | | | | | | | This warning was showing up in the Clang static analyzer in Xcode: "Null pointer argument in call to memory copy function" Fix provided by Ian Wilkinson. Review URL: https://breakpad.appspot.com/569002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1162 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor LinuxDumper and MinidumpWriter.benchan@chromium.org2012-01-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | 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 two convenient methods, back() and empty(), to the wasteful_vector class. 2. Refactor the LinuxDumper class such that it can later be splitted into a base class and two derived classes, one uses the current ptrace implementation and one uses a core file. 3. Refactor the MinidumpWriter class such that it can later use different derived implementations of LinuxDumper. 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. Review URL: http://breakpad.appspot.com/340001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@902 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Write a window of memory around the instruction pointer from the crashing ↵ted.mielczarek2010-09-231-0/+206
thread to the minidump on OS X. R=nealsid at http://breakpad.appspot.com/200001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@699 4c0a9323-5329-0410-9bdc-e9ce6186880e