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.
-
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.daramarak– daramarak2013-11-15 09:20:04 +00:00Commented Nov 15, 2013 at 9:20
-
I did not get your reply .Avinash Kumar– Avinash Kumar2013-11-15 09:23:14 +00:00Commented 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.daramarak– daramarak2013-11-15 09:25:54 +00:00Commented Nov 15, 2013 at 9:25
-
how when gdb is running your code (without stopping the execution ) ?Avinash Kumar– Avinash Kumar2013-11-15 09:45:50 +00:00Commented 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.daramarak– daramarak2013-11-15 10:02:24 +00:00Commented Nov 15, 2013 at 10:02
Add a comment
|
1 Answer
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.