summaryrefslogtreecommitdiff
path: root/Documentation/botr
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2017-07-18 14:33:53 -0700
committerGitHub <noreply@github.com>2017-07-18 14:33:53 -0700
commit901e0d12de9b956946b805aa4799c783daf2aeda (patch)
tree814a0843f91ef80d504c0271758ca40b9cfbaa8b /Documentation/botr
parentc059ec9cbbedd8a25a785a2c4d1a0515732134d6 (diff)
downloadcoreclr-901e0d12de9b956946b805aa4799c783daf2aeda.tar.gz
coreclr-901e0d12de9b956946b805aa4799c783daf2aeda.tar.bz2
coreclr-901e0d12de9b956946b805aa4799c783daf2aeda.zip
Update minidump and debugging doc (#12884)
Update debugging doc on loading sos on Windows.
Diffstat (limited to 'Documentation/botr')
-rw-r--r--Documentation/botr/xplat-minidump-generation.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/botr/xplat-minidump-generation.md b/Documentation/botr/xplat-minidump-generation.md
index 03cd517a4a..47d6e5cb7c 100644
--- a/Documentation/botr/xplat-minidump-generation.md
+++ b/Documentation/botr/xplat-minidump-generation.md
@@ -24,6 +24,8 @@ Core dump generation is triggered anytime coreclr is going to abort (via [PROCAb
The _createdump_ utility starts by using ptrace to enumerate and suspend all the threads in the target process. The process and thread info (status, registers, etc.) is gathered. The auxv entries and _DSO_ info is enumerated. _DSO_ is the in memory data structures that described the shared modules loaded by the target. This memory is needed in the dump by gdb and lldb to enumerate the shared modules loaded and access their symbols. The module memory mappings are gathered from /proc/$pid/maps. None of the program or shared modules memory regions are explicitly added to dump's memory regions. The _DAC_ is loaded and the enumerate memory region interfaces are used to build the memory regions list just like on Windows. The threads stacks and one page of code around the IP are added. The byte sized regions are rounded up to pages and then combined into contagious regions.
+All the memory mappings from /proc/$pid/maps are in the PT_LOAD sections even though the memory is not actually in the dump. They have a file offset/size of 0.
+
After all the process crash information has been gathered, the ELF core dump with written. The main ELF header created and written. The PT\_LOAD note section is written one entry for each memory region in the dump. The process info, auxv data and NT_FILE entries are written to core. The NT\_FILE entries are built from module memory mappings from /proc/$pid/maps. The threads state and registers are then written. Lastly all the memory regions gather above by the _DAC_, etc. are read from the target process and written to the core dump. All the threads in the target process are resumed and _createdump_ terminates.
**Severe memory corruption**
@@ -49,7 +51,7 @@ Any configuration or policy is set with environment variables which are passed a
Environment variables supported:
- `COMPlus_DbgEnableMiniDump`: if set to "1", enables this core dump generation. The default is NOT to generate a dump.
-- `COMPlus_DbgMiniDumpType`: if set to "1" generates _MiniDumpNormal_, "2" _MiniDumpWithPrivateReadWriteMemory_, "3" _MiniDumpFilterTriage_. Default is _MiniDumpNormal_.
+- `COMPlus_DbgMiniDumpType`: if set to "1" generates _MiniDumpNormal_, "2" _MiniDumpWithPrivateReadWriteMemory_, "3" _MiniDumpFilterTriage_, "4" _MiniDumpWithFullMemory_. Default is _MiniDumpNormal_.
- `COMPlus_DbgMiniDumpName`: if set, use as the template to create the dump path and file name. The pid can be placed in the name with %d. The default is _/tmp/coredump.%d_.
- `COMPlus_CreateDumpDiagnostics`: if set to "1", enables the _createdump_ utilities diagnostic messages (TRACE macro).
@@ -71,7 +73,6 @@ The test plan is to modify the SOS tests in the (still) private debuggertests re
# Open Issues #
-- Do we need a full memory dump option? It would not use the _DAC_ to get the memory regions but all the readable memory from the shared module list. Do we include the shared modules' code?
- May need more than just the pid for decorating dump names for docker containers because I think the _pid_ is always 1.
- Do we need all the memory mappings from `/proc/$pid/maps` in the PT\_LOAD sections even though the memory is not actually in the dump? They have a file offset/size of 0. Full dumps generated by the system or _gdb_ do have these un-backed regions.
- There is no way to get the signal number, etc. that causes the abort from the _createdump_ utility using _ptrace_ or a /proc file. It would have to be passed from CoreCLR on the command line.