Page MenuHomePhabricator

[debugserver] Fix that debugserver's stop reply packets always return signal code 0
ClosedPublic

Authored by teemperor on Aug 21 2020, 2:28 AM.

Details

Summary

If our process terminates due to an unhandled signal, we are supposed to get
the signal code via WTERMSIG. However, we instead try to get the exit status
via WEXITSTATUS which just ends up always calculating signal code 0 (at least
on the macOS implementation where it just shifts the signal code bits away and
we're left with only 0 bits).

The exit status calculation on the LLDB side also seems a bit off as it claims
an exit status that is just the signal code (instead of for example 128 + signal code),
but that will be another patch.

Diff Detail

Event Timeline

teemperor requested review of this revision.Aug 21 2020, 2:28 AM
teemperor created this revision.
teemperor edited the summary of this revision. (Show Details)Sep 2 2020, 1:38 AM
jasonmolenda accepted this revision.Sep 2 2020, 1:45 AM

Ah sorry lost track of this one; that looks correct, thanks for the fix.

This revision is now accepted and ready to land.Sep 2 2020, 1:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 3 2020, 12:47 AM