Debugging with GDB (September 2007)

Chapter 21: The gd b/mi Interface 295
Asynchronous command. Starts execution of the inferior from the beginning. The
inferior executes until either a breakpoint is encounte red or the program exits.
GDB command
The corresponding GDB command is run’.
Example
(gdb)
-break-insert main
^done,bkpt=number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00002a08",
func="main",file="hello.c",line="23",times="0"
(gdb)
-exec-run
^running
(gdb)
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame=addr="0x00002a08",
func="main",args=[],file="hello.c",line="23"
(gdb)
The -exec-show-arguments command
Synopsis
-exec-show-arguments
Print the arguments of the program.
GDB command
The corresponding GDB command is show args’.
Example
N.A.
The -exec-step Co mm and
Synopsis
-exec-step
Asynchronous command. Resumes execution of the inferior program, stopping when the
beginning of the next source line is reached, if the next source line is not a function call. If
it is, stop at the first instruction of the called function.