about summary refs log tree commit diff
path: root/src/rustllvm/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-13 05:26:52 +0100
committerGitHub <noreply@github.com>2019-01-13 05:26:52 +0100
commitb3290fd14ce4d15ccd6e4719af5d98552cb85efd (patch)
tree859036d1df893992a90388b65bce38a924409a69 /src/rustllvm/ArchiveWrapper.cpp
parent0c53b45e8581e439cf890adaba857014f7ef1fdb (diff)
parentbbb5448de447eeef2eae09a6df93553a6d1ccac7 (diff)
downloadrust-b3290fd14ce4d15ccd6e4719af5d98552cb85efd.tar.gz
rust-b3290fd14ce4d15ccd6e4719af5d98552cb85efd.zip
Rollup merge of #57473 - alexcrichton:hex-display-on-windows, r=Kimundi
std: Render large exit codes as hex on Windows

On Windows process exit codes are never signals but rather always 32-bit
integers. Most faults like segfaults and such end up having large
integers used to represent them, like STATUS_ACCESS_VIOLATION being
0xC0000005. Currently, however, when an `ExitStatus` is printed this
ends up getting rendered as 3221225477 which is somewhat more difficult
to debug.

This commit adds a branch in `Display for ExitStatus` on Windows which
handles exit statuses where the high bit is set and prints those exit
statuses as hex instead of with decimals. This will hopefully preserve
the current display for small exit statuses (like `exit code: 22`), but
assist in quickly debugging segfaults/access violations/etc. I've
found at least that the hex codes are easier to search for than decimal.

I wasn't able to find any official documentation saying that all system
exit codes have the high bit set, but I figure it's a good enough
heuristic for now.
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions