aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/minidump_descriptor.cc
AgeCommit message (Collapse)Author
2023-02-27Add #include <config.h> to the beginning of all cc filesIan Barkley-Yeung
Added #ifdef HAVE_CONFIG_H #include <config.h> #endif to the beginning of all source files that didn't have it. This ensures that configuration options are respected in all source files. In particular, it ensures that the defines needed to fix Large File System issues are set before including system headers. More generally, it ensures consistency between the source files, and avoids the possibility of ODR violations between source files that were including config.h and source files that were not. Process: Ran find . \( -name third_party -prune \) -o \( -name '.git*' -prune \) -o \( \( -name '*.cc' -o -name '*.c' \) -exec sed -i '0,/^#include/ s/^#include/#ifdef HAVE_CONFIG_H\n#include <config.h> \/\/ Must come first\n#endif\n\n#include/' {} + \) and then manually fixed up src/common/linux/guid_creator.cc, src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc, src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc, src/common/stabs_reader.h, and src/common/linux/breakpad_getcontext.h. BUG=google-breakpad:877 Fixed: google-breakpad:877 TEST=./configure && make && make check TEST=Did the find/sed in ChromeOS's copy, ensured emerge-hana google-breakpad worked and had fewer LFS violations. TEST=Did the find/sed in Chrome's copy, ensured compiling hana, windows, linux, and eve still worked (since Chrome doesn't used config.h) Change-Id: I16cededbba0ea0c28e919b13243e35300999e799 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4289676 Reviewed-by: Mike Frysinger <vapier@chromium.org>
2022-09-07Update copyright boilerplate, 2022 edition (Breakpad)Mark Mentovai
sed -i '' -E -e 's/Copyright (\(c\) )?([0-9-]+),? (Google|The Chromium Authors).*(\r)?$/Copyright \2 Google LLC\4/' -e '/^((\/\/|#| \*) )?All rights reserved\.?\r?$/d' -e 's/name of Google Inc\. nor the/name of Google LLC nor the/' -e 's/POSSIBILITY OF SUCH DAMAGE$/POSSIBILITY OF SUCH DAMAGE./' $(git grep -El 'Copyright (\(c\) )?([0-9-]+),? (Google|The Chromium Authors).*$') Plus manual fixes for src/processor/disassembler_x86.{cc,h}. Plus some conversions from CRLF to LF line endings in .cc and .h files. Bug: chromium:1098010 Change-Id: I8030e804eecd9f5a1ec9d66ae166efd8418c2a67 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3878302 Reviewed-by: Mike Frysinger <vapier@chromium.org>
2017-01-31Sanitize dumped stacks to remove data that may be identifiable.Tobias Sargeant
In order to sanitize the stack contents we erase any pointer-aligned word that could not be interpreted as a pointer into one of the processes' memory mappings, or a small integer (+/-4096). This still retains enough information to unwind stack frames, and also to recover some register values. BUG=682278 Change-Id: I541a13b2e92a9d1aea2c06a50bd769a9e25601d3 Reviewed-on: https://chromium-review.googlesource.com/430050 Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-01-19Add API to skip dump if crashing thread doesn't reference a given module (2)Tobias Sargeant
Follow-up CL to add relevant code to the copy constructor and assignment operator for MinidumpDescriptor BUG=664460 Change-Id: I71c0ad01d8686a9215a718cebc9d11a215ea342c Reviewed-on: https://chromium-review.googlesource.com/430711 Reviewed-by: Robert Sesek <rsesek@chromium.org>
2015-09-28Add GPU fingerprint information to breakpad microdumps.Primiano Tucci
Although strictly the GPU fingerprint is defined by the build fingerprint, there is not currently a straightforward mapping from build fingerprint to useful GPU / GL driver information. In order to aid debugging of WebView crashes that occur in GL drivers, and to better understand the range of drivers and versions for feature blacklisting purposes, it is useful to have GPU fingerprints in breakpad microdumps. Landing this patch on behalf of Tobias Sargeant<tobiasjs@chromium.org> BUG=chromium:536769 R=primiano@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1334473003 .
2015-05-15[microdump] Add build fingerprint and product info metadata.primiano@chromium.org
This is to add build fingerprint and product name/version to microdumps. Conversely to what happens in the case of minidumps with MIME fields, due to the nature of minidumps, extra metadata cannot be reliably injected after the dump is completed. This CL adds the plumbing to inject two optional fields plus the corresponding tests. BUG=chromium:410294 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1125153008 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1456 4c0a9323-5329-0410-9bdc-e9ce6186880e
2015-01-09Fix the scope on the initialization of kMicrodumpOnConsole to match header.primiano@chromium.org
I whish I knew how this worked for months in chromium as it is clearly wrong. As reported by azarchs@ it is breaking the cygprofile instrumented build. BUG=chromium:410294 Review URL: https://breakpad.appspot.com/1784002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1413 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-10-28Introduce microdump writer class.primiano@chromium.org
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
2013-02-14size_limit_ member of minidump_descriptor ignored in copy constructorted.mielczarek@gmail.com
Patch by Avishai Hendel <avish@fb.com>, R=mkrebs at https://codereview.appspot.com/7305060/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1114 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-21Fix unused variable warning in optimized build (fix proveded by Matthew Riley)ivan.penkov@gmail.com
http://breakpad.appspot.com/499002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1084 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-17Allow setting a new MinidumpDescriptor on ExceptionHandler, also expose ↵ted.mielczarek@gmail.com
directory from MinidumpDescriptor R=digit at https://breakpad.appspot.com/452003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1037 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-09Adding a way to create an ExceptionHandler that takes in a file descriptorjcivelli@chromium.org
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