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

terminal: ask for confirmation when using 'quit -c' with breakpoints #3398

Merged
merged 1 commit into from Jun 7, 2023

Conversation

aarzilli
Copy link
Member

If there are some breakpoints and the user executes 'quit -c' (quit and
continue) ask for confirmation since the behavior in that case may be
unexpected.

Fixes #1961

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

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.

Just a few small changes (posted my approval accidentally without this feedback).

numbp := 0
for _, bp := range bps {
if bp.ID >= 0 {
numbp++
Copy link
Member

Choose a reason for hiding this comment

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

We can just short circuit here, we don't care how many breakpoints are set, just that they exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

pkg/terminal/command.go Outdated Show resolved Hide resolved
If there are some breakpoints and the user executes 'quit -c' (quit and
continue) ask for confirmation since the behavior in that case may be
unexpected.

Fixes go-delve#1961
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 9b17415 into go-delve:master Jun 7, 2023
1 of 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.

Feature request: clear all client breakpoints on exit
2 participants