Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pause gdb without breakpoint

Tags:

When I am debugging a program in Xcode, I can pause execution in there debugger console. Is there any way to do this using gdb from the command line?

I'd like to do this so I can modify breakpoints after the program has started.

like image 283
rich.e Avatar asked Oct 09 '11 22:10

rich.e


People also ask

How do I pause gdb?

To stop your program while it is running, type "(ctrl) + c" (hold down the ctrl key and press c). gdb will stop your program at whatever line it has just executed. From here you can examine variables and move through your program.

How do I skip a breakpoint in gdb?

To skip a breakpoint a certain number of times, we use the ignore command. The ignore command takes two arguments: the breakpoint number to skip, and the number of times to skip it. (gdb) ignore 2 5 Will ignore next 5 crossings of breakpoint 2.

How do I turn off break point?

In the Query Editor window, right-click the breakpoint, and then click Delete Breakpoint. In the Breakpoints window, right-click the breakpoint, and then click Delete on the shortcut menu. In the Breakpoints window, select the breakpoint, and then press DELETE.


1 Answers

You can just press Ctrl+C and will be able to do what you ask, although it might not always work (see comments below).

like image 80
RushPL Avatar answered Oct 18 '22 03:10

RushPL