Fix for bug 34532 - A few rough corners related to post-mortem debugging…

Description

Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)

The main change is to avoid setting the process state as running when
debugging core/minidumps (details in the bug).

Also included a few small, related fixes around how the errors propagate in
this case.

patch by lemo

Bug: https://bugs.llvm.org/show_bug.cgi?id=34532

Differential Revision: https://reviews.llvm.org/D37651