step

Step forward in source, into any function calls.

Syntax

step [expr]

Parameters

expr

A numeric expression.

Description

This command executes a line of source code. When the next line to be executed contains a function call, the debugger steps into the function and stops at the first executable statement.

If you specify expr, the debugger evaluates the expression as a positive integer that specifies the number of times to execute the step command. The expression can be any expression that is valid in the current context.

Example

The following example, five step commands continue executing a C++ program:

GDB Mode:

(idb) list +0,+4
151 Node* currentNode = _firstNode; 
152 while (currentNode->getNextNode()) 
153 currentNode = currentNode->getNextNode(); 
154 currentNode->setNextNode(node); 
(idb) step
152 while (currentNode->getNextNode()) 
(idb) step
Node::getNextNode (this=0x805c500) at src/x_list.cxx:81 
81 Node* Node::getNextNode() {return _nextNode; } 
(idb) step
81 Node* Node::getNextNode() {return _nextNode; } 
(idb) step
List<Node>::append (this=0xbfffcbe0, node=0x805c510) at src/x_list.cxx:152 
152 while (currentNode->getNextNode()) 
(idb) step
154 currentNode->setNextNode(node); 

IDB Mode:

(idb) list $curline:4
> 151 Node* currentNode = _firstNode; 
152 while (currentNode->getNextNode()) 
153 currentNode = currentNode->getNextNode(); 
154 currentNode->setNextNode(node); 
(idb) step
stopped at [void List<Node>::append(class Node* const):152 0x0804ae75] 
152 while (currentNode->getNextNode()) 
(idb) step
stopped at [class Node* Node::getNextNode(void):81 0x08051be5] 
81 Node* Node::getNextNode() {return _nextNode; } 
(idb) step
stopped at [class Node* Node::getNextNode(void):81 0x08051bec] 
81 Node* Node::getNextNode() {return _nextNode; } 
(idb) step
stopped at [void List<Node>::append(class Node* const):152 0x0804ae81] 
152 while (currentNode->getNextNode()) 
(idb) step
stopped at [void List<Node>::append(class Node* const):154 0x0804aebf] 
154 currentNode->setNextNode(node);

See Also


Submit feedback on this help topic

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