summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 01:18:35 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 01:18:35 +0000
commitabaa71c990b2d9dd514e9f2eefb1d2cf7b720562 (patch)
tree202c89d876e45f30c44132122f885877210230b7 /chrome/app/chrome_dll_main.cc
parentb80d5016c18ad5816bbff0698ff3407e77feabf1 (diff)
downloadchromium_src-abaa71c990b2d9dd514e9f2eefb1d2cf7b720562.zip
chromium_src-abaa71c990b2d9dd514e9f2eefb1d2cf7b720562.tar.gz
chromium_src-abaa71c990b2d9dd514e9f2eefb1d2cf7b720562.tar.bz2
Linux: add internal core dump reporting.
In order to get a handle on a number of browser crashes, this patch adds an options for Google internal folks to upload full core files when the browser crashes. The core files are uploaded to an internal IP address and will be available to other developers. This is only enabled for Chrome branded builds and then, only if --google-internal-crash-reporting is given on the command line. http://codereview.chromium.org/160212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 652217e..b375474 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -51,6 +51,9 @@
#if defined(OS_MACOSX)
#include "chrome/app/breakpad_mac.h"
#endif
+#if defined(OS_LINUX)
+#include "chrome/app/breakpad_linux.h"
+#endif
#include "chrome/app/scoped_ole_initializer.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/chrome_constants.h"
@@ -346,6 +349,21 @@ int ChromeMain(int argc, const char** argv) {
int ret = execlp("man", "man", binary.BaseName().value().c_str(), NULL);
LOG(FATAL) << "execlp failed: " << strerror(ret);
}
+
+#if defined(GOOGLE_CHROME_BUILD)
+ if (parsed_command_line.HasSwitch(switches::kGoogleInternalCrashReporting)) {
+ // Enable full core dump reporting. Internal only.
+ std::string core_dump_directory;
+ if (EnableCoreDumping(&core_dump_directory)) {
+ LOG(WARNING) << "Full core dump reporting enabled.";
+ const pid_t child = fork();
+ if (child != 0) {
+ MonitorForCoreDumpsAndReport(core_dump_directory, child);
+ _exit(0);
+ }
+ }
+ }
+#endif
#endif
#if defined(OS_POSIX)