6

I want to add some breakpoints while gdb is executing . How to suspend running gdb and insert breakpoint and continue from there . I tried ctrl+z , it kills the gdb process.

5
  • Do you pass a certain point in the code when you want to insert the breakpoint? It is possible to create a breakpoint that just insert another. Commented Nov 15, 2013 at 9:20
  • I did not get your reply . Commented Nov 15, 2013 at 9:23
  • Instead of actually stopping the execution of the program it is possible to activate or set breakpoints at certain points in your code. Either via breakpoints or watchpoints. Commented Nov 15, 2013 at 9:25
  • how when gdb is running your code (without stopping the execution ) ? Commented Nov 15, 2013 at 9:45
  • I suggest you read the Stopping and Continuing part of the gdb manual I reference in my answer below. Commented Nov 15, 2013 at 10:02

1 Answer 1

9

Ctrl-c breaks the execution of your program within gdb, and allows you to insert any breakpoints you like. Stopping is very well explained in the manual. I would suggest you read it, it gives you an huge advantage when debugging.

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

Comments

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.