Go forward to Calling
Go backward to Signaling
Go up to Altering
Go to the top op gdb
Returning from a function
You can cancel execution of a function call with the `return'
command. If you give an EXPRESSION argument, its value is used as
the function's return value.
When you use `return', GDB discards the selected stack frame (and
all frames within it). You can think of this as making the discarded
frame return prematurely. If you wish to specify a value to be
returned, give that value as the argument to `return'.
This pops the selected stack frame (*note Selecting a frame:
Selection.), and any other frames inside of it, leaving its caller as
the innermost remaining frame. That frame becomes selected. The
specified value is stored in the registers used for returning values of
The `return' command does not resume execution; it leaves the
program stopped in the state that would exist if the function had just
returned. In contrast, the `finish' command (*note Continuing and
stepping: Continuing and Stepping.) resumes execution until the
selected stack frame returns naturally.
Created Mon Nov 8 17:42:38 2004 on tillpc with info_to_html version 0.9.6.