Contents


On-line Guides
All Guides
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems

How To Guides
Xen Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions

 

 

5.4 Stepping through the program

To move forward and execute the line displayed above, use the command step:

(gdb) step
7         return foo (p);

After executing line 6, the debugger displays the next line to be executed. The pointer p will now have been set to zero (null):

(gdb) print p
$1 = (int *) 0x0

The command step will follow the execution of the program interactively through any functions that are called in the current line. If you want to move forward without tracing these calls, use the command next instead.


 
 
  Published under the terms of the GNU General Public License Design by Interspire