diff --git a/client/crashpad_client.h b/client/crashpad_client.h index f357ca01..dfe13538 100644 --- a/client/crashpad_client.h +++ b/client/crashpad_client.h @@ -615,7 +615,7 @@ class CrashpadClient { #elif defined(OS_WIN) std::wstring ipc_pipe_; ScopedKernelHANDLE handler_start_thread_; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_ANDROID) std::set unhandled_signals_; #endif // OS_MACOSX diff --git a/handler/crashpad_handler.md b/handler/crashpad_handler.md index c4126b62..f7e63a50 100644 --- a/handler/crashpad_handler.md +++ b/handler/crashpad_handler.md @@ -279,6 +279,13 @@ establish the Crashpad client environment before running a program. library, typically in response to a user requesting this behavior. If this option is not specified, this program will behave as if uploads are disabled. + * **--use-cros-crash-reporter** + + Causes crash reports to be passed via an in-memory file to + `/sbin/crash_reporter` instead of storing them in the database. The database + is still used for Crashpad settings. This option is only valid on Chromium + OS. + * **--help** Display help and exit. diff --git a/handler/handler_main.cc b/handler/handler_main.cc index ba0d57e9..d5a9e609 100644 --- a/handler/handler_main.cc +++ b/handler/handler_main.cc @@ -163,8 +163,11 @@ void Usage(const base::FilePath& me) { " only if uploads are enabled for the database\n" #if defined(OS_CHROMEOS) " --use-cros-crash-reporter\n" +" pass crash reports to /sbin/crash_reporter\n" +" instead of storing them in the database\n" " --minidump-dir-for-tests=TEST_MINIDUMP_DIR\n" -" the directory for testing minidumps\n" +" causes /sbin/crash_reporter to leave dumps in\n" +" this directory instead of the normal location\n" #endif // OS_CHROMEOS " --help display this help and exit\n" " --version output version information and exit\n", @@ -936,10 +939,16 @@ int HandlerMain(int argc, #if defined(OS_CHROMEOS) if (options.use_cros_crash_reporter) { - exception_handler = std::make_unique( + auto cros_handler = std::make_unique( database.get(), &options.annotations, user_stream_sources); + + if (!options.minidump_dir_for_tests.empty()) { + cros_handler->SetDumpDir(options.minidump_dir_for_tests); + } + + exception_handler = std::move(cros_handler); } else { exception_handler = std::make_unique( database.get(), @@ -959,12 +968,6 @@ int HandlerMain(int argc, user_stream_sources); #endif // OS_CHROMEOS -#if defined(OS_CHROMEOS) - if (!options.minidump_dir_for_tests.empty()) { - exception_handler->SetDumpDir(options.minidump_dir_for_tests); - } -#endif - #if defined(OS_LINUX) || defined(OS_ANDROID) if (options.exception_information_address) { ExceptionHandlerProtocol::ClientInformation info;