From 3fb9d8d2fe094f09a914d31a551e14fe8a1f2215 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 3 May 2017 17:17:22 -0700 Subject: Createdump fixes and cleanup. (#11368) Fixed "with heap" option to actually include all the heaps. The way /proc/$pid/maps was parsed missed most of the RW data/heap regions. Added -u/--full full core dump options. Removed the useless m_memStatus variable in enummem.cpp. --- src/ToolBox/SOS/Strike/sosdocsunix.txt | 1 + src/ToolBox/SOS/Strike/strike.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ToolBox') diff --git a/src/ToolBox/SOS/Strike/sosdocsunix.txt b/src/ToolBox/SOS/Strike/sosdocsunix.txt index 517227c092..e9fd59cd5f 100644 --- a/src/ToolBox/SOS/Strike/sosdocsunix.txt +++ b/src/ToolBox/SOS/Strike/sosdocsunix.txt @@ -623,6 +623,7 @@ createdump [options] [dumpFileName] -n - create minidump. -h - create minidump with heap (default). -t - create triage minidump. +-f - create full core dump (everything). -d - enable diagnostic messages. Creates a platform (ELF core on Linux, etc.) minidump. The pid can be placed in the dump diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp index 0d5d8c3b8b..1fff17fb26 100644 --- a/src/ToolBox/SOS/Strike/strike.cpp +++ b/src/ToolBox/SOS/Strike/strike.cpp @@ -14385,6 +14385,7 @@ DECLARE_API(CreateDump) BOOL normal = FALSE; BOOL withHeap = FALSE; BOOL triage = FALSE; + BOOL full = FALSE; BOOL diag = FALSE; size_t nArg = 0; @@ -14393,6 +14394,7 @@ DECLARE_API(CreateDump) {"-n", &normal, COBOOL, FALSE}, {"-h", &withHeap, COBOOL, FALSE}, {"-t", &triage, COBOOL, FALSE}, + {"-f", &full, COBOOL, FALSE}, {"-d", &diag, COBOOL, FALSE}, }; CMDValue arg[] = @@ -14407,7 +14409,11 @@ DECLARE_API(CreateDump) ULONG pid = 0; g_ExtSystem->GetCurrentProcessId(&pid); - if (withHeap) + if (full) + { + minidumpType = MiniDumpWithFullMemory; + } + else if (withHeap) { minidumpType = MiniDumpWithPrivateReadWriteMemory; } -- cgit v1.2.3