Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: components/crash/app/breakpad_linux.cc

Issue 904213002: [components/crash] Add crash client method to enable microdumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/crash/app/crash_reporter_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/app/breakpad_linux.cc
diff --git a/components/crash/app/breakpad_linux.cc b/components/crash/app/breakpad_linux.cc
index a925e07143e680f4cdb48e626f99253a352cb9a5..c6fef0da0c0b48a23bfb26ae35e00043f167aa3b 100644
--- a/components/crash/app/breakpad_linux.cc
+++ b/components/crash/app/breakpad_linux.cc
@@ -714,21 +714,19 @@ bool MicrodumpCrashDone(const MinidumpDescriptor& minidump,
return FinalizeCrashDoneAndroid(is_browser_process);
}
-// When unwind tables are stripped out (to save binary size) the stack traces
-// produced locally in the case of a crash / CHECK are meaningless. In order to
-// provide meaningful development diagnostics (and keep the binary size savings)
-// on Android we attach a secondary crash handler, in addition to the breakpad
-// minidump uploader (which depends on the user consent).
// The microdump handler does NOT upload anything. It just dumps out on the
// system console (logcat) a restricted and serialized variant of a minidump.
// See crbug.com/410294 for more details.
void InitMicrodumpCrashHandlerIfNecessary(const std::string& process_type) {
-#if !defined(NO_UNWIND_TABLES) \
- || (!defined(ARCH_CPU_ARMEL) && !defined(ARCH_CPU_ARM64))
+#if (!defined(ARCH_CPU_ARMEL) && !defined(ARCH_CPU_ARM64))
// TODO(primiano): For the moment microdumps are enabled only on arm (32/64).
// Extend support to other architectures (requires some breakpad changes).
return;
#endif
+
+ if (!GetCrashReporterClient()->ShouldEnableBreakpadMicrodumps())
+ return;
+
VLOG(1) << "Enabling microdumps crash handler (process_type:"
<< process_type << ")";
DCHECK(!g_microdump);
« no previous file with comments | « no previous file | components/crash/app/crash_reporter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698