Skip to content
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

feat: print a message when the debugee process exits #3870

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

jakejx
Copy link
Contributor

@jakejx jakejx commented Nov 25, 2024

This MR makes a simple change to print a message when the debugee process exits. This is useful when debugging a process that is abruptly killed (for e.g. OOM). Currently, it will just look like the process has "hung".

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client already prints something on exit. Is this because of headless instances?

@jakejx
Copy link
Contributor Author

jakejx commented Nov 25, 2024

Hello, yeap the main use case is for headless instances and when --continue is used. I did notice that on MacOS, LLDB does print an exit message. But this does not happen when using dlv on Linux.

@aarzilli
Copy link
Member

Then it needs to work like the maybePrintUnattendedBreakpointWarning (see the call to it below). In fact, it should probably be renamed maybePrintUnattendedStopWarning and be called on both places.

@jakejx
Copy link
Contributor Author

jakejx commented Nov 27, 2024

Thanks, let me check those out.

@jakejx jakejx force-pushed the jake.ng/exit-message branch 2 times, most recently from e65b613 to 1580380 Compare November 27, 2024 06:40
@jakejx
Copy link
Contributor Author

jakejx commented Nov 27, 2024

Hi @aarzilli, I have updated the PR with your suggestion. Hopefully I did not misunderstand your suggestion.

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakejx jakejx force-pushed the jake.ng/exit-message branch from 1580380 to 25baac3 Compare November 29, 2024 05:38
@jakejx jakejx force-pushed the jake.ng/exit-message branch from 25baac3 to e96d6bb Compare November 29, 2024 05:40
Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekparker derekparker merged commit 9af0968 into go-delve:master Dec 2, 2024
2 checks passed
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.

3 participants