return (idb mode only)

Continue execution until the current or specified function returns.

Syntax

return [function_name]

Parameters

function_name

The function until which you want to continue execution.

Description

This command continues execution until the current, or specified, function returns. If you do not specify a function name, this command continues execution of the current function until it returns to its caller.

Specify a function name to continue the execution until control is returned to the specified function. The function must be active on the call stack.

This command is sensitive to the user's location in the call stack. Suppose function A calls function B, which calls function C. Execution has stopped in function C, and you entered the up command, so you are now in function B, at the point where it called function C. Using the return command here returns you to function A, at the point where function A called function B. Functions B and C will have completed execution.

Example

In this example the return command causes the user routine append to complete and return to the caller. At that point, the debugger returns control to the user.

(idb) cont
[1] stopped at [void List<Node>::append(class Node* const):151 0x0804ae6d] 
151 Node* currentNode = _firstNode; 
(idb) return
stopped at [int main(void):195 0x080518c8] 
195 nodeList.append(new IntNode(3)); {static int somethingToReturnTo; somethingToReturnTo++; } 

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.