Continue execution until the current function returns.
finish
None.
This command continues execution of the current function until it returns to its caller.
The finish command is sensitive to your location in the call stack. Suppose function A calls function B, which calls function C. Execution has stopped in function C, and you enter the up command, so you are now in function B, at the point where it called function C. Using the finish command here returns you to function A, at the point where function A called function B. Functions B and C have completed execution.
The following example finishes the append method and returns control to the caller.
(idb) continue Continuing. Breakpoint 1, List<Node>::append (this=0xbfffcbe0, node=0x805c540) at src/x_list.cxx:151 151 Node* currentNode = _firstNode; (idb) finish main () at src/x_list.cxx:195 195 nodeList.append(new IntNode(3)); {static int somethingToReturnTo; somethingToReturnTo++; }
Copyright © 2001-2011, Intel Corporation. All rights reserved.