Fix dump generation issues for VS4Mac (#61063)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 9 Nov 2021 18:16:52 +0000 (10:16 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Nov 2021 18:16:52 +0000 (10:16 -0800)
commitc61ea3dc03a4b547f043ce622b85516f84a20040
tree9e1cc9f1bf515b73fcd557b5bd4718b78f6b3588
parentc5a20f916b465707919aa5b6a78f7c4c7675c423
Fix dump generation issues for VS4Mac (#61063)

The VS4Mac team found two issues preventing them from successfully diagnosing VS4Mac failures
on .NET:

1) Multiple "crashed" threads in the crash report json (#60932).
2) No flag or way to generate the crash report for hangs via the diagnostic server IPC commands (#60775).

Add new generate core dump IPC command that allows the generate crash report flag to be passed through to createdump for
VS4Mac. VS4Mac needs to distinguish between WriteDump/no signal and unknown signal ExceptionType. Change unknown signal
exception type to 0.

Issue: https://github.com/dotnet/runtime/issues/60775

Fix how the load bias is calculate for shared modules

Local testing with the SOS tests. VS4Mac team testing and verification.

Low risk because it only affects createdump, dump IPC command and the runtime dump generation path.
13 files changed:
src/coreclr/debug/createdump/crashreportwriter.cpp
src/coreclr/debug/dbgutil/machoreader.cpp
src/coreclr/pal/inc/pal.h
src/coreclr/pal/src/thread/process.cpp
src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h
src/coreclr/vm/excep.cpp
src/coreclr/vm/excep.h
src/coreclr/vm/gcenv.ee.cpp
src/mono/mono/eventpipe/ds-rt-mono.h
src/native/eventpipe/ds-dump-protocol.c
src/native/eventpipe/ds-dump-protocol.h
src/native/eventpipe/ds-rt.h
src/native/eventpipe/ds-types.h