aboutsummaryrefslogtreecommitdiff
path: root/src/common/memory_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch the Linux minidump writer to use MDCVInfoELF for CV data.Ted Mielczarek2016-04-051-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 .
* Thanks to Matthew Riley who noticed this issue and provided the initial ↵ivan.penkov@gmail.com2013-05-231-0/+8
| | | | | | | | | | | | 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
* Fixing various compiler warnings and applying minor tweaks to allow running ofivan.penkov@gmail.com2012-07-021-1/+1
| | | | | | | | | | the mojority of breakpad unittests in Google. http://breakpad.appspot.com/399002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@978 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor LinuxDumper and MinidumpWriter.benchan@chromium.org2012-01-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | 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/+84
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