Skip to content

Commit cbf713d

Browse files
committed
Linux: support setting crash dump path
1 parent 3be78bc commit cbf713d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/breakpad_linux.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "breakpad/src/common/memory.h"
4040
#include "content/nw/src/breakpad_linux_impl.h"
4141
#include "chrome/common/child_process_logging.h"
42+
#include "chrome/common/chrome_paths.h"
4243
#include "components/breakpad/breakpad_client.h"
4344
#include "content/public/common/content_descriptors.h"
4445
#include "content/public/common/content_switches.h"
@@ -1716,3 +1717,13 @@ void InitNonBrowserCrashReporterForAndroid() {
17161717
bool IsCrashReporterEnabled() {
17171718
return g_is_crash_reporter_enabled;
17181719
}
1720+
1721+
bool SetCrashDumpPath(const char* path) {
1722+
if (!g_breakpad)
1723+
return false;
1724+
g_breakpad->set_minidump_descriptor(MinidumpDescriptor(path));
1725+
base::FilePath filepath(path);
1726+
// for renderer dumps
1727+
PathService::Override(chrome::DIR_CRASH_DUMPS, filepath);
1728+
return true;
1729+
}

src/breakpad_linux.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ extern void InitNonBrowserCrashReporterForAndroid();
2222
// whether InitCrashReporter() is called.
2323
bool IsCrashReporterEnabled();
2424

25+
bool SetCrashDumpPath(const char* path);
2526
#endif // CHROME_APP_BREAKPAD_LINUX_H_

0 commit comments

Comments
 (0)