38

I get into situations in gdb/ddd where there are too many breakpoints.

Sometimes I want to disable or remove all of them at once. Sometimes I want to disable or remove all except for one. I find the ddd breakpoints menu confusing and unreliable. How can I do this with a gdb command?

2 Answers 2

51

To delete all the breakpoints, use delete command with no arguments; it can be abbreviated to del or d.

To disable all, use disable (with no arguments) to disable all breakpoints.

To disable all but one, use disable (with no arguments), but then do enable N, where N is the index of the breakpoint you want to keep.

Sign up to request clarification or add additional context in comments.

Comments

20

I want to disable or remove all of them at once, or all except for one.

Use disable (with no arguments) to disable all breakpoints, followed by enable N, where N is the breakpoint you want to keep.

1 Comment

I consolidated this info into the upvoted answer so that a single answer has all the info the question asked for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.