Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
The -exec-next-instruction command
Synopsis
-exec-next-instruction
Asynchronous command. Executes one machine instruction. If the instruction is a function,
call continues until the function returns. If the program stops at an instruction in the middle
of a source line, the address will be printed as well.
GDB command
The corresponding GDB command is 'nexti'.
Example
(gdb)
-exec-next-instruction
^running
(gdb)
*stopped,reason="end-stepping-range",thread-
id="1",frame=addr="0x00002a14",func="main",args=[],file="hello.c",line="24"
(gdb)
The -exec-return command
Synopsis
-exec-return
Makes current function return immediately. Does not execute the inferior. Displays the
new current frame.
GDB command
The corresponding GDB command is return'.
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"],
21.7 GDB/MI program control 333