Create a createdump static library for single-file dump generation (#84864)
authorMike McLaughlin <mikem@microsoft.com>
Wed, 10 May 2023 00:32:34 +0000 (17:32 -0700)
committerGitHub <noreply@github.com>
Wed, 10 May 2023 00:32:34 +0000 (17:32 -0700)
commitbc1175382857c4af11c27b3134fd22dc8377dfb5
tree9d3f8967894ff814985ac03e9397c88016e656aa
parent3747edb1812106f0b88a42b724c3e44b69dc79c4
Create a createdump static library for single-file dump generation (#84864)

* Create a createdump static library for single-file and native AOT dump generation

A "createdump_static" lib is now built that is linked into the single-file host and
in the future can be linked into a Native AOT host/app going forward. For single-file
apps most of the same unhandled exception or crash dump generation code is the same
(same env vars, most of all the PAL code is the same) except where createdump executable
was execve, a callback invokes (set by the host) the static createdump lib entry point.

File full dumps are generated (which currently are very large under MacOS) but the user
can put the DAC side-by-side with their app and the smaller heap or mini dumps can be
generated. The SDK could give an option to publish the DAC SXS for a single-file app.
19 files changed:
src/coreclr/debug/createdump/CMakeLists.txt
src/coreclr/debug/createdump/crashinfo.cpp
src/coreclr/debug/createdump/crashinfo.h
src/coreclr/debug/createdump/crashinfomac.cpp
src/coreclr/debug/createdump/crashinfounix.cpp
src/coreclr/debug/createdump/crashreportwriter.cpp
src/coreclr/debug/createdump/createdump.h
src/coreclr/debug/createdump/createdumpmain.cpp [new file with mode: 0644]
src/coreclr/debug/createdump/createdumpunix.cpp
src/coreclr/debug/createdump/createdumpwindows.cpp
src/coreclr/debug/createdump/datatarget.cpp
src/coreclr/debug/createdump/main.cpp
src/coreclr/pal/inc/pal.h
src/coreclr/pal/src/thread/process.cpp
src/native/corehost/apphost/static/CMakeLists.txt
src/native/corehost/corehost.cpp
src/native/corehost/hostmisc/pal.h
src/native/corehost/hostmisc/pal.unix.cpp
src/native/corehost/hostmisc/pal.windows.cpp