aboutsummaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
...
* Use sys_prctl instead of prctl.thestig@chromium.org2012-01-241-8/+5
| | | | | | | http://breakpad.appspot.com/339002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@906 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Implement core dump to minidump conversion.benchan@chromium.org2012-01-1910-356/+1005
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Turn the LinuxDumper class into a base class and move ptrace related code into a new derived class, LinuxPtraceDumper. 2. Add a LinuxCoreDumper class, which is derived from LinuxDumper, to extract information from a crashed process via a core dump file instead of ptrace. 3. Add a WriteMinidumpFromCore function to src/client/linux/minidump_writer/minidump_writer.h, which uses LinuxCoreDumper to extract information from a core dump file. 4. Add a core2md utility, which simply wraps WriteMinidumpFromCore, for converting a core dump to a minidump. 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 Chromium OS tests to test core2md. Review URL: http://breakpad.appspot.com/343001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@905 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor LinuxDumper and MinidumpWriter.benchan@chromium.org2012-01-114-88/+128
| | | | | | | | | | | | | | | | | | | | | | | 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
* Send crash dumps to Google via HTTPS instead of HTTP, since they mightthestig@chromium.org2012-01-041-1/+1
| | | | | | | | | | | | | contain sensitive information. BUG=none TEST=crash dumps still arrive A=palmer@chromium.org Original code review: http://breakpad.appspot.com/338001 Review URL: http://breakpad.appspot.com/334002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@899 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Eliminate another source of UnspecifiedStackSignature crash dumps.mark@chromium.org2011-12-211-45/+38
| | | | | | | | | | | | | | | | | Manufacturing an exception record improves the crash reporting, since then the crashes get bucketed by the call stack leading to the dump, instead of all falling into a misc bucket that nobody ever looks at. Currently these are occuring through e.g. dumps from the base watchdog. Link against RtlCaptureContext, as the function has been documented as available from Windows XP [http://msdn.microsoft.com/en-us/library/windows/desktop/ms680591(v=vs.85).aspx]. Patch by Siggi Asgeirsson <siggi@chromium.org> git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@897 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Replace readlink calls with a safer version that guarantees NULL-termination.benchan@chromium.org2011-12-214-14/+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 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-161-16/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* Add API on iOS to generate dump on demand.qsr@chromium.org2011-12-092-2/+66
| | | | | | Review URL: http://breakpad.appspot.com/331001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@893 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a missed include path change from r889. (r=qsr in person)stuartmorgan2011-12-021-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@892 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculative back-out of r883, which may have broken Windows crash reporting.mark@chromium.org2011-11-2813-208/+4
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@891 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Create a static library to use Breakpad on iOS.qsr@chromium.org2011-11-238-8/+562
| | | | | | | This obliged me to move BreakpadDefines.h to src/client/apple/Framework/BreakpadDefines.h Review URL: http://breakpad.appspot.com/329001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@889 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct compilation warning.qsr@chromium.org2011-11-236-185/+109
| | | | | | | | | 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-183-18/+17
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@887 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct bug introduced by last commit: Interface on Breakpad is incorrect.qsr@chromium.org2011-11-162-6/+8
| | | | | | | R=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@886 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add an API to Breakpad to upload custom file to the crash server.qsr@chromium.org2011-11-165-106/+178
| | | | | | | | | | | On iOS, sending logs using the usual breakpad behavior is not possible, because tar is not available. This allow to use Breakpad to send any file to the crash server. R=mark@chromium.org Review URL: http://breakpad.appspot.com/327001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@885 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix several error-case leaks on the Mac found by clang analysisstuartmorgan2011-11-142-2/+8
| | | | | | | Review URL: http://breakpad.appspot.com/325001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@884 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow CrashGenerationClient to request that a dump of the parent process be ↵ted.mielczarek2011-11-1113-4/+208
| | | | | | | | written. A=Jim Mathies <jmathies@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=679238 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@883 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct leak.qsr@chromium.org2011-11-101-2/+2
| | | | | | | Uploaders were never released. Review URL: http://breakpad.appspot.com/326001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@882 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix problem with not NULL terminating mapping name.kmixter@chromium.org2011-11-091-1/+2
| | | | | | | BUG=453 Review URL: http://breakpad.appspot.com/323001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@881 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add mach_vm_deallocate to the set of function not available on iOS5.qsr@chromium.org2011-10-241-0/+1
| | | | | | Review URL: http://breakpad.appspot.com/318003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@880 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Do not use mach_vm.h on iOS.qsr@chromium.org2011-10-245-15/+56
| | | | | | | | | | mach_vm.h has been removed from iOS5. Use #define to use vm_ replacement of mach_vm_ functions on iOS. Do not use mach_vm_allocate -> use a stack variable instead. Review URL: http://breakpad.appspot.com/321001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@879 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some shadow variables, including one in file_id.cc that causes all files ↵thestig@chromium.org2011-10-201-2/+2
| | | | | | | | 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
* Allow to retrieve id of a module from memory instead of going to disk for iOS.qsr@chromium.org2011-10-202-7/+25
| | | | | | | | 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
* Fix svn:executable and svn:eol-style properties in src/client/windows.mark@chromium.org2011-10-2016-0/+0
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@872 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad implementation for ios.qsr@chromium.org2011-10-123-0/+890
| | | | | | | | | | | | | | To be noted: 1) All is done in process, as multi-process is not allowed on ios. 2) Dump are saved when a crash occures but are not automatically send to the server. 3) Breakpad.h contains function to check if a dump must be uploaded, and to upload a dump. 4) The code is copy pasting a log of Breakpad implementation for Mac OS. It might be possible to do some refactoring. Review URL: http://breakpad.appspot.com/309003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@868 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove duplicate definition of GTMLoggerDebug.mark@chromium.org2011-10-111-3/+0
| | | | | | | | | | | | The actual defintion comes from common/mac/GTMLogger.h, #imported above. This removes a compilation warning that showed up in r853: uploader.m:52:9: warning: 'GTMLoggerDebug' macro redefined GTMLogger.h:339:9: note: previous definition is here Review URL: http://breakpad.appspot.com/310002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@859 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding missing method.qsr@chromium.org2011-10-111-0/+5
| | | | | | | parameters method was missing on Uploader. Review URL: http://breakpad.appspot.com/312001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@858 4c0a9323-5329-0410-9bdc-e9ce6186880e
* #include BreakpadDefines.h as "BreakpadDefines.h" and notmark@chromium.org2011-10-111-1/+1
| | | | | | | | | | | | | | | | <Breakpad/BreakpadDefines.h>. During the build of Breakpad itself (especially in Chromium), there is no Breakpad.framework/Headers in which to locate BreakpadDefines.h, so the framework-style #include of <Breakpad/BreakpadDefines.h> is not able to find anything to #include. Using the "BreakpadDefines.h" form should always locate this file next to Breakpad.h whether it's in the framework or in the source tree. This fixes a Chromium build regression caused by Breakpad r856. Review URL: http://breakpad.appspot.com/313001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@857 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Extract constants from Breakpad.h.qsr@chromium.org2011-10-119-65/+98
| | | | | | | This is done to allow ios implementation to use the same constants. Review URL: http://breakpad.appspot.com/311001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@856 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handle ios dump.qsr@chromium.org2011-10-111-0/+4
| | | | | | | | | | This change add a flag for ios minidumps and allow handler to recognize it. It doesn't recognize arm specific exceptions that will be logged as unknown type. Review URL: http://breakpad.appspot.com/311002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@855 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Extract the uploader process from crash_report_senderqsr@chromium.org2011-10-105-570/+695
| | | | | | | | The aim is to separate the process itself from the view, to be able to reuse the process on the iOS platform. Review URL: http://breakpad.appspot.com/309002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@853 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Extracting the config file class from the Inspector to be able to reuse it.qsr@chromium.org2011-10-105-224/+325
| | | | | | | | | 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
* #ifdef cpu specific code.qsr@chromium.org2011-10-076-9/+160
| | | | | | Review URL: http://breakpad.appspot.com/307002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@848 4c0a9323-5329-0410-9bdc-e9ce6186880e
* 10.4 SDK fixmark@chromium.org2011-10-063-1/+21
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@847 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Address review comments from r843 (http://breakpad.appspot.com/307001)mark@chromium.org2011-10-054-15/+25
| | | | | | Review URL: http://breakpad.appspot.com/308001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@844 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Ensure crash reports will be uploaded on the Mac.mark@chromium.org2011-10-053-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression from Breakpad r842 (Chromium r103778) - browser crash reports were uploaded, but renderer crash reports were not. Messages such as these may have been logged: com.apple.launchd.peruser.x[y] could not lookup DNS configuration info service: (ipc/send) invalid destination port com.apple.launchd.peruser.x[y] Breakpad Reporter: Send Error: Error Domain=NSURLErrorDomain Code=-1009 UserInfo=z "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=w "This computer’s Internet connection appears to be offline.") When OnDemandServer establishes the bootstrap subset, it will now register the parent bootstrap port in the subset namespace so that the Inspector can recover this port and switch to it. The Sender, launched by the Inspector, relies on the bootstrap port being set properly. BUG=chromium:99252 TEST=All test cases from Chromium r103778 (bug chromium:28547) plus: about:crash should generate a crash report which should be uploaded, provided that throttling is not in effect. Remove or edit ~/Library/Preferences/com.Breakpad.crash_report_sender.plist to defeat throttling. Also verify that about:inducebrowsercrashforrealz works. Review URL: http://breakpad.appspot.com/307001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@843 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use a bootstrap subset port for the inspector, tying the subset to themark@chromium.org2011-10-031-10/+26
| | | | | | | | | | | | | | | lifetime of the task to be monitored, the invoking task. This allows the bootstrap server (in launchd) to automatically clean up the Mach server registration when the task being monitored exits, avoiding leaks of com.Breakpad.Inspector(pid) ports in "launchctl bslist". BUG=chromium:28547 TEST=Handler should still crash catches, but inspector ports should no longer show up in "launchctl bslist". They should show up under a subset port in "launchctl bstree" instead. "launchctl bstree" must be invoked as root. Review URL: http://breakpad.appspot.com/306001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@842 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some compilation warnings and other errors due to API changesmark@chromium.org2011-09-292-17/+11
| | | | | | Review URL: http://breakpad.appspot.com/305002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@841 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Build the Mac Breakpad utilities with the 10.5 SDK in x86_64 Debug mode. Thismark@chromium.org2011-09-281-23/+23
| | | | | | | | | | was already the SDK being used for x86_64 Release mode. The 10.6 SDK is not necessary. Explicitly set the file encoding to UTF-16 on the sender app's lproj's InfoPlist.strings and Localizable.strings files. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@840 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix encoding of breakpad/src/client/mac/testapp/English.lproj/InfoPlist.stringsmark@chromium.org2011-09-271-1/+1
| | | | | | | in breakpad/src/client/mac/Breakpad.xcodeproj - it's UTF-16, not UTF-8. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@839 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some newlines.mark@chromium.org2011-09-275-977/+977
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@838 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix totally busted-up project file that was, for the most part, wrong formark@chromium.org2011-09-271-9/+65
| | | | | | | non-Debug configurations and was probably even a little wrong for Debug too. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@837 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove javascript_engine GYP variable.mihaip@chromium.org2011-09-131-5/+1
| | | | | | | | | (it's no longer needed in Chromium as of http://crrev.com/100692) Review URL: http://breakpad.appspot.com/303001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@834 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a Breakpad crash during teardown when USE_PROTECTED_ALLOCATIONS is inmark@chromium.org2011-08-261-0/+8
| | | | | | | | | | | | effect. BUG=none TEST=Apple Crash Reporter logs from processes in which Breakpad handles the crash should point the finger at the actual crash source, not the Breakpad thread's attempt to write to unwritable memory. Review URL: http://breakpad.appspot.com/301001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@828 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add missing (parentehses.)mark@chromium.org2011-08-261-1/+1
| | | | | | | | BUG=247, chromium:94107 TEST=Minidump file sizes should be manageable Review URL: http://breakpad.appspot.com/300002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@827 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix CalculateStackSize to behave properly when the main thread's stack ismark@chromium.org2011-08-252-27/+32
| | | | | | | | | | | | | | | | | | split up into multiple regions. An older workaround relyied on known fixed stack locations and only filled in the initial page of the stack if it was in a distinct region. The new approach looks upwards for additional regions that appear to be part of the same stack. With PIE on Lion, the stack no longer begins at a fixed address, so the older workaround became ineffective. BUG=247, chromium:94107 TEST=Stacks should run through to _main/start and then stop when examining Chrome on Lion with PIE and "slid" stacks. Review URL: http://breakpad.appspot.com/300001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@826 4c0a9323-5329-0410-9bdc-e9ce6186880e
* The process_id field is unsigned, so we need this cast in c++0x.mark@chromium.org2011-08-111-1/+2
| | | | | | | | | Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com> https://bugzilla.mozilla.org/show_bug.cgi?id=677644 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@825 4c0a9323-5329-0410-9bdc-e9ce6186880e
* The first field in a MDLocationDescriptor is a u_int32_t, so change this castmark@chromium.org2011-08-111-1/+2
| | | | | | | | | | | | to the correct type. This fixes an error newer clang versions find in c++ 0x mode. Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com> https://bugzilla.mozilla.org/show_bug.cgi?id=677641 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@824 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix clang warnings.mark@chromium.org2011-08-113-4/+4
| | | | | | Review URL: http://breakpad.appspot.com/298002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@823 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove a bogus const.mark@chromium.org2011-08-101-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@821 4c0a9323-5329-0410-9bdc-e9ce6186880e