Reputation: 5550
I am debugging a C++ program with gdb. After running gdb python
, I set the breakpoints and run the program. However, after I quit the program, I leave the gdb debugger altogether.
If I make a change in my code and would like rerun the program, I have to do the whole process again. Run 'gdb python`, type the breakpoints (because the commands are not in the history), etc.
Is there a more efficient way to deal with this debugging problem?
Upvotes: 0
Views: 220
Reputation: 5550
I realized Ctrl +C
does the job @EmployedRussian is talking about.
Upvotes: 0
Reputation: 213789
I leave the gdb debugger altogether
Why? Don't do that.
Instead, leave GDB running, rebuild your program (in another terminal), then use GDB run
command again to re-run the rebuilt program.
Upvotes: 1