Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

Example
(gdb)
-break-insert call1
^done,bkpt=number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000029ac",
func="call1",file="hello.c",line="9",times="0"
(gdb)
-exec-run
^running
(gdb)
~"3"
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame=addr="0x000029ac",
func="call1",args=[name="a"],file="hello.c",line="9"
(gdb)
-exec-return
~"2"
~"3"
^done,frame=level="0 ",addr="0x000029e8",func="call",args=[name="a",name="b"],
file="hello.c",line="17"
(gdb)
The -exec-run command
Synopsis
-exec-run
Asynchronous command. Starts execution of the inferior from the beginning. The inferior executes
until either a breakpoint is encountered 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
Prints the arguments of the program.
GDB command
The corresponding GDB command is 'show args'.
Example
N.A.
GDB/MI program control 255