aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/minidump_writer.h
Commit message (Collapse)AuthorAgeFilesLines
* Use public fpregset_t type to define fpstate_tMichael Forney2020-03-101-1/+2
| | | | | | | | | | | | | | | The _libc_fpstate struct tag is an implementation detail of glibc, and musl uses a different struct tag, _fpstate. Unfortunately, the public type fpregset_t is a pointer type, so is not suitable for allocating storage, or referring to constant storage. Instead, we can use std::remove_pointer<fpregset_t>::type to refer to the pointed-to type, regardless of the struct tag. Bug: google-breakpad:631 Change-Id: Iaf47f15b2d834dd8de839431f65a481e9b0c7f9e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2096171 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Wire up stack sanitization and skipping to WriteMinidumpTobias Sargeant2017-02-031-6/+24
| | | | | | | | | | | | This makes the parameters stored in the MinidumpDescriptor structure functional for minidumps, analogously to how they are applied to microdumps. BUG=664460 Change-Id: I7578e7a1638cea8f0445b18d4bbdaf5e0a32d808 Reviewed-on: https://chromium-review.googlesource.com/435380 Reviewed-by: Robert Sesek <rsesek@chromium.org>
* Introduce microdump writer class.primiano@chromium.org2014-10-281-8/+0
| | | | | | | | | | | | | | | | | | | Microdumps are a very lightweight variant of minidumps. They are meant to dump a minimal crash report on the system log (logcat on Android), containing only the state of the crashing thread. This is to deal with cases where the user has opted out from crash uploading but we still want to generate meaningful information on the device to pull a stacktrace for development purposes. Conversely to conventional stack traces (e.g. the one generated by Android's debuggerd or Chromium's base::stacktrace) microdumps do NOT require unwind tables to be present in the target binary. This allows to save precious binary size (~1.5 MB for Chrome on Arm, ~10 MB on arm64). More information and design doc on crbug.com/410294 BUG=chromium:410294 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1398 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add Arm64 version of breakpad_getcontext for Android.rmcilroy@chromium.org2014-04-031-0/+7
| | | | | | | | | | | | This CL adds breakpad_getcontext support for Arm64 to Android. The assembly is based on getcontext.S in glibc. BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1384002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1302 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-1/+1
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add optional file size limit for minidumpsmkrebs@chromium.org2012-11-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | When there are upwards of 200 threads in a crashing process, each having an 8KB stack, this can result in a huge, 1.8MB minidump file. So I added a parameter that, if set, can compel the minidump writer to dump less stack. More specifically, if the writer expects to go over the limit (due to the number of threads), then it will dump less of a thread's stack after the first 20 threads. There are two ways to specify the limit, depending on how you write minidumps: 1) If you call WriteMinidump() directly, there's now a version of the function that takes the minidump size limit as an argument. 2) If you use the ExceptionHandler class, the MinidumpDescriptor object you pass to it now has a set_size_limit() method you would call before passing it to the constructor. BUG=chromium-os:31447, chromium:154546 TEST=Wrote a size-limit unittest; Ran unittests Review URL: https://breakpad.appspot.com/487002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1082 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow generating minidumps from live process on Linux via ExceptionHandlerted.mielczarek@gmail.com2012-09-181-0/+8
| | | | | | | Original patch by Chris Jones <jones.chris.g@gmail.com> at https://bugzilla.mozilla.org/show_bug.cgi?id=544936 and https://bugzilla.mozilla.org/show_bug.cgi?id=555309 R=mark at https://breakpad.appspot.com/449003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1043 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow adding extra memory regions to minidump on linux/windowsted.mielczarek@gmail.com2012-09-181-3/+23
| | | | | | | A=Bill McCloskey <wmccloskey@mozilla.com>, ted, original patch from https://bugzilla.mozilla.org/show_bug.cgi?id=662646 R=mark at https://breakpad.appspot.com/450002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1041 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding a way to create an ExceptionHandler that takes in a file descriptorjcivelli@chromium.org2012-08-091-6/+12
| | | | | | | | | | | | where the minidump should be created, without the need of opening any other file. BUG=None TEST=Run unit-tests. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1007 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculatively back out r989 per http://codereview.chromium.org/10805065/ :mark@chromium.org2012-07-241-15/+2
| | | | | | | | | | | | | | | | | | | | Ted Mielczarek: > You could try backing out r989, although Mozilla has been running with that > patch for months without issue. Me: > src/client/windows/handler/exception_handler.cc in r989 appears to have > formatting problems, an unwanted property change, and no real Breakpad review > history, so maybe we should back it out anyway until the proper process is > followed. NACL Tests nacl_integration failures: http://build.chromium.org/p/chromium/builders/NACL%20Tests/builds/30138 chrome src/native_client/tests/inbrowser_crash_test/crash_dump_tester.py says that the observed failures are a symptom of crash_service.exe itself crashing. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@998 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow adding extra memory regions to minidump on linux/windowsted.mielczarek2012-07-191-2/+15
| | | | | | A=Bill McCloskey <wmccloskey@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=662646 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@989 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Changes to get the breakpad client compiling and running on Android usingmark@chromium.org2012-04-031-6/+11
| | | | | | | | | | | ndk-7b. Patch by Carlos Valdivia <carlosvaldivia@google.com> Review URL: https://breakpad.appspot.com/363001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Implement core dump to minidump conversion.benchan@chromium.org2012-01-191-0/+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. 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
* allow passing info about known memory mappings to MinidumpWriter and ↵ted.mielczarek2010-12-131-0/+14
| | | | | | | | ExceptionHandler r=thestig at http://breakpad.appspot.com/242001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@741 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Merge of Breakpad Chrome Linux forknealsid2009-08-171-0/+53
A=agl, Lei Zhang R=nealsid, agl git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@384 4c0a9323-5329-0410-9bdc-e9ce6186880e