Skip to content

Backport [debugserver] Fix that debugserver's stop reply packets always return signal code 0 #1938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Teemperor
Copy link

No description provided.

… signal code 0

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.

Reviewed By: jasonmolenda

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

(cherry picked from commit f0699d9)
The test only checks the exit code that the debug server sends back, but
not the following explanation which is different for debugserver and lldb-server.

(cherry picked from commit e123959)
@Teemperor
Copy link
Author

@swift-ci test

@Teemperor Teemperor merged commit 5288c94 into swiftlang:apple/stable/20200714 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant