Skip to content
Snippets Groups Projects
Commit fff574b2 authored by morrita@chromium.org's avatar morrita@chromium.org
Browse files

TestShell windows: add --crash-dumps-fulldump option

to allow the dump including the heap memory.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/5262011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67925 0039d316-1c4b-4281-b951-d872f2087c98
parent 067802e2
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,8 @@ const char kNoErrorDialogs[] = "noerrdialogs";
// respectively, and interferes with interactive use of the UI.
const char kLayoutTests[] = "layout-tests";
const char kCrashDumps[] = "crash-dumps"; // Enable crash dumps
// Dumps the full-heap instead of only stack. Used with kCrashDumps.
const char kCrashDumpsFulldump[] = "crash-dumps-fulldump";
// Causes the test_shell to run with a generic theme (part of layout_tests).
const char kGenericTheme[] = "generic-theme";
......
......@@ -10,6 +10,7 @@
namespace test_shell {
extern const char kCrashDumps[];
extern const char kCrashDumpsFulldump[];
extern const char kDumpPixels[];
extern const char kLayoutTests[];
extern const char kGenericTheme[];
......
......@@ -151,6 +151,11 @@ HINSTANCE TestShell::instance_handle_;
/////////////////////////////////////////////////////////////////////////////
// static methods on TestShell
const MINIDUMP_TYPE kFullDumpType = static_cast<MINIDUMP_TYPE>(
MiniDumpWithFullMemory | // Full memory from process.
MiniDumpWithProcessThreadData | // Get PEB and TEB.
MiniDumpWithHandleData); // Get all handle information.
void TestShell::InitializeTestShell(bool layout_test_mode,
bool allow_external_pages) {
// Start COM stuff.
......@@ -180,7 +185,14 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) {
std::wstring dir(
parsed_command_line.GetSwitchValueNative(test_shell::kCrashDumps));
new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true);
if (parsed_command_line.HasSwitch(test_shell::kCrashDumpsFulldump)) {
new google_breakpad::ExceptionHandler(
dir, 0, &MinidumpCallback, 0, true,
kFullDumpType, 0, 0);
} else {
new google_breakpad::ExceptionHandler(
dir, 0, &MinidumpCallback, 0, true);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment