aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAgeFilesLines
...
* Add utilities for processing Linux core dump files.benchan@chromium.org2012-01-079-26/+1039
| | | | | | | | | | | | | | | | | | | | | 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 an ElfCoreDump class for processing Linux core dump files, which will later be used to implement the core dump to minidump conversion. 2. Add a CrashGenerator class for generating a crash with a core dump file for testing the functionalities of ElfCoreDump. 3. Move some utility functions for reading/writing files to file_utils.h. 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/337001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@900 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Replace MMappedRange with MinidumpMemoryRange.benchan@chromium.org2011-12-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | This patch is part of a bigger patch that helps merging the breakpad code with the modified version in Chromium OS. The MemoryRange class was added in r895 (http://breakpad.appspot.com/332001), which is largely based on MMappedRange but generalized to be used in other code. However, MemoryRange does not support minidump data structures. This patch adds a MinidumpMemoryRange class that extends MemoryRange to handle minidump data structures, which can then replace MMappedRange. As with MemoryRange, MinidumpMemoryRange is unit tested. 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/335001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@898 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Replace readlink calls with a safer version that guarantees NULL-termination.benchan@chromium.org2011-12-214-3/+210
| | | | | | | | | | | | | | | | | | | | | 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 SafeReadLink function that wraps sys_readlink() to resolve a symbolic link but guarantees the result is NULL-terminated on success. 2. Refactor other source code to use SafeReadLink instead of readlink() or sys_readlink(). 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/334001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@896 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor code in preparation of merging with the fork in Chromium OS.benchan@chromium.org2011-12-168-22/+769
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix some comments and parameter names.jimblandy2011-11-232-4/+5
| | | | | | | | Trivial changes; committing for post-facto review. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@890 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct compilation warning.qsr@chromium.org2011-11-233-7/+107
| | | | | | | | | 1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison. 2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests. Review URL: http://breakpad.appspot.com/328001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace.ted.mielczarek2011-11-184-8/+13
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@887 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Upstream fix for compiling of breakpad with gcc-4.6. Remove an unnecessarymark@chromium.org2011-10-221-1/+1
| | | | | | | | | | | | "const" that causes an error with the newer gcc. BUG=chromium-os:14973 TEST=Built CrOS's google-breakpad Patch by Michael Krebs <mkrebs@chromium.org> git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@878 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some shadow variables, including one in file_id.cc that causes all files ↵thestig@chromium.org2011-10-203-17/+114
| | | | | | | | to generate the same hash. Add a test to make sure this doesn't happen again. Review URL: http://breakpad.appspot.com/316002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@875 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct incorrect bounds checking.qsr@chromium.org2011-10-201-2/+2
| | | | | | Review URL: http://breakpad.appspot.com/319002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@874 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow to retrieve id of a module from memory instead of going to disk for iOS.qsr@chromium.org2011-10-204-24/+77
| | | | | | | | Allow macho_id and macho_walker to read data from memory. Wire up this when reading module on iOS. Review URL: http://breakpad.appspot.com/319001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@873 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add includes for unittests that appear to need them.jessicag.feedback@gmail.com2011-10-175-4/+26
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@870 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handling reading arm executable.qsr@chromium.org2011-10-121-0/+6
| | | | | | | | Because CPU_TYPE_ARM is not defined on Mac OSX 10.4, I have to redefine the variable to the correct value. Review URL: http://breakpad.appspot.com/310004 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@867 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Minor formatting fix following r865.mark@chromium.org2011-10-111-2/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@866 4c0a9323-5329-0410-9bdc-e9ce6186880e
* More fixes following r862.mark@chromium.org2011-10-111-6/+6
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@865 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Additional fixes following r862.mark@chromium.org2011-10-112-31/+34
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@864 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove "using namespace std" from dwarf2reader.h. Using-directives aremark@chromium.org2011-10-115-40/+41
| | | | | | | | | | | | | forbidden by the style guide, and are bad practice in headers even under style rules that tolerate this construct. This fixes warnings such as: In file included from dwarf2reader.cc:34: dwarf2reader.h:53:17: warning: using namespace directive in global context in header [-Wheader-hygiene] Review URL: http://breakpad.appspot.com/312002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@862 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix harmless warning in dwarf_cfi_to_module.cc.mark@chromium.org2011-10-111-1/+1
| | | | | | | | | | | | | | | | | This function already establishes that (signed) i must be positive by the time it assigns it to (unsigned) reg. Because reg is unsigned, it is impossible for it to be negative. Because i was already checked for positivity, this check can be removed entirely. It was not a miswritten check that intended to check i instead of reg, because i is already checked. This addresses the following warning: dwarf_cfi_to_module.cc:135:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare] Committed r859 Review URL: http://breakpad.appspot.com/310003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@861 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use right header.qsr@chromium.org2011-10-101-1/+1
| | | | | | | Code was pulling Cocoa dependency, when Foundation is enough. Review URL: http://breakpad.appspot.com/310001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@854 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Extracting the config file class from the Inspector to be able to reuse it.qsr@chromium.org2011-10-102-3/+3
| | | | | | | | | This will be needed for iOS implementation, where the Inspector won't be used, but where a config file will still be needed, because the uploads won't happen just after the crash, but on a next run. Review URL: http://breakpad.appspot.com/309001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@852 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some compilation warnings and other errors due to API changesmark@chromium.org2011-09-291-1/+2
| | | | | | Review URL: http://breakpad.appspot.com/305002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@841 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux/Mac: Add option to omit the CFI section in dump_syms.thestig@chromium.org2011-09-148-108/+169
| | | | | | Review URL: http://breakpad.appspot.com/304001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@835 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 243 - Linux dumper should use build id produced by ld --build-id if ↵ted.mielczarek2011-08-305-96/+260
| | | | | | | | available R=thestig at http://breakpad.appspot.com/185001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@830 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix libcurl include in http_upload (trivial, no bug)ted.mielczarek2011-08-301-2/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@829 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix clang warnings.mark@chromium.org2011-08-111-6/+0
| | | | | | Review URL: http://breakpad.appspot.com/298002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@823 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Zero out the entire context on MD5_Final, not just the number of bytes in amark@chromium.org2011-08-111-1/+1
| | | | | | | pointer. Review URL: http://breakpad.appspot.com/298001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@822 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Wean Mac Breakpad off of its OpenSSL libcrypto dependency.mark@chromium.org2011-07-273-49/+14
| | | | | | | | | | | | | | | | | | This libcrypto dependency sucks. Linking against OpenSSL is sort of broken in certain Mac OS X SDKs. libcrypto was only being used to provide an MD5 implementation. Breakpad already has its own MD5 implementation, so just use that instead. To be perfectly honest, on modern systems, nothing should be making MD5 hashes of modules anyway, because everything has an embedded LC_UUID. The project file changes just remove libcrypto and add md5.c as needed. A bonus (and untested) fix for on_demand_symbol_supplier.mm is included to account for changes in r794. Review URL: http://breakpad.appspot.com/296001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@819 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Switch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a ↵ted.mielczarek2011-07-262-2/+4
| | | | | | | | FILE* to match the changes to Module::Write R=mark at http://breakpad.appspot.com/294001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@818 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove curl/types.h include, since this header has been deprecated for a ↵ted.mielczarek2011-07-211-1/+0
| | | | | | | | long time and removed in a recent curl release. P=Evan Shaw <edsrzf@gmail.com> R=ted git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@814 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add some unit tests for Linux WriteSymbolFileted.mielczarek2011-07-0613-227/+887
| | | | | | | | | | | This patch adds synth_elf::{StringTable,SymbolTable,ELF} classes to produce in-memory ELF files to properly test the Linux symbol dumping code. It also uses those classes to add some basic tests for the WriteSymbolFile function. R=jimb at http://breakpad.appspot.com/277001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@794 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Dump PUBLIC + CFI records from libraries without debug info on Linux, use ↵ted.mielczarek2011-07-064-5/+710
| | | | | | | | .dynsym for symbol names if there are no usable debug symbols. R=jimb at http://breakpad.appspot.com/275001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@793 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixed message about unregistered msdia*dll. Builds with different DiaSDK ↵vitalybuka@chromium.org2011-04-261-2/+7
| | | | | | | | | | | | | need different dll. Rebuilt with Visual Studio 2008. Slightly improved refresh_binaries.bat. BUG=none TEST=none Review URL: http://breakpad.appspot.com/281001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@787 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 417: update unit tests after adding unnamed function detectionjimblandy2011-03-141-2/+2
| | | | | | | | | | | In r779, at the last moment, I added a default call count expectation for the UnnamedFunction warning to the CUFixtureBase constructor, but didn't re-run the tests. This patch adjusts all affected tests. a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@782 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Google Breakpad Issue 417: Handle DWARF that omits function names.jimblandy2011-03-115-3/+48
| | | | | | | | | | | | | | | This patch makes sure dump_syms behaves properly when presented with malformed DWARF data that provides no name for a function. We print a warning message to stderr, and subsitute "<name omitted>" for the empty string, so that the "FUNC" record written to the symbol file for the function is still well-formed. (We may have line number data covering the function, so it would be a shame to omit the function altogether.) Unit tests included. a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@779 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Put PUBLIC lines in Mac symbol files.ted.mielczarek2011-03-049-11/+270
| | | | | | | | Exported symbols on Mach-O binaries are defined in a STABS section. This patch makes stabs_reader handle them, adds support for Extern symbols in the Module class (which are output as PUBLIC lines in symbol files), and the proper processing in stabs_to_module to hook it all up. A=mark R=jimb at http://breakpad.appspot.com/163001 and http://breakpad.appspot.com/267001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@778 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make programs in src/tools/linux build via the automake build systemted.mielczarek2011-02-283-23/+27
| | | | | | R=jimb at http://breakpad.appspot.com/265001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@775 4c0a9323-5329-0410-9bdc-e9ce6186880e
* enable writing INFO CODE_ID line in symbol filested.mielczarek2011-02-151-3/+1
| | | | | | R=mark (originally from http://breakpad.appspot.com/180001) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@773 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add missing constructor to CPPLanguage class to make it compile with CLang.ted.mielczarek2011-01-251-0/+1
| | | | | | P=rafael.espindola R=jimb at https://bugzilla.mozilla.org/show_bug.cgi?id=623121 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@764 4c0a9323-5329-0410-9bdc-e9ce6186880e
* allow uploading zero-byte files in HTTPUploadted.mielczarek@gmail.com2010-12-152-8/+7
| | | | | | R=mark at http://breakpad.appspot.com/243001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@743 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Propagate failure if http uploads fail with http error codes.kmixter@chromium.org2010-12-081-0/+3
| | | | | | | | | R=ted.mielczarek BUG=413 Review URL: http://breakpad.appspot.com/236001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@739 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add specific curl headers to facilitate building on Ubuntu Lucid nealsid2010-11-172-5/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@732 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix assert failure in dump_syms caused by binary linked with gold.thestig@chromium.org2010-11-081-2/+2
| | | | | | | | | Original review: http://breakpad.appspot.com/224001 A=raymes R=ccoutant Review URL: http://breakpad.appspot.com/227001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@729 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use STABS as the debugging format when using GCC 4.0 and the 10.4 SDK.mmentovai2010-11-081-0/+1
| | | | | | | Ref. http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/51c7715953b3904d git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@726 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add support for building the Linux client code using the Android NDKted.mielczarek2010-10-201-0/+4
| | | | | | r=mwu at http://breakpad.appspot.com/212001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@716 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make dump_syms output an INFO CODE_ID line that includes the code file and ↵ted.mielczarek2010-10-054-14/+204
| | | | | | | | code identifier. (Currently disabled to give Breakpad users time to update their processor code.) R=mark at http://breakpad.appspot.com/180001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@710 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Write a window of memory around the instruction pointer from the crashing ↵ted.mielczarek2010-09-232-5/+12
| | | | | | | | 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
* Fix compilation of file_id_unittest.thestig@chromium.org2010-09-161-5/+5
| | | | | | Review URL: http://breakpad.appspot.com/198001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@689 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Import linux_syscall_support.h from linux-syscall-support.googlecode.com ↵thestig@chromium.org2010-09-153-2951/+2
| | | | | | | | instead of using our own copy. Review URL: http://breakpad.appspot.com/192001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@686 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Revert revision 658 ('Add glog style logging to symupload').erikwright@chromium.org2010-09-152-117/+3
| | | | | | | R=nealsid at http://breakpad.appspot.com/190001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@685 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a handful of comment spelling errors (Issue 385)jessicag.feedback@gmail.com2010-09-091-3/+3
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@682 4c0a9323-5329-0410-9bdc-e9ce6186880e