In Linux system operation, GDB is a program debugging tool, and has a variety of functions, the following small series will give you a detailed introduction to the functions of GDB, so that you have GDB A detailed understanding.
Perhaps, you like the graphical interface, VC, BCB and other IDE debugging, but if you are doing software on the UNIX platform, you will find that GDB debugging tools have better than VC, BCB More powerful features of the graphical debugger. The so-called "small length, short ruler" is this truth. In general, GDB mainly helps you to complete the following four aspects:
Start your program, you can run the program as you want, according to your custom requirements.
Allows the program being debugged to stop at the breakpoint of the call you specified. (A breakpoint can be a conditional expression.)
When the program is stopped, you can check what happens in your program at this time.
Dynamically change the execution environment of your program.
From the above point of view, GDB is no different from the general debugging tools, basically it is to complete these functions, but in the details, you will find that GDB is a powerful debugging tool, you may be used to graphical Debugging tools, but sometimes the command-line debugging tools have features that graphical tools can't. Let us look at it one by one.
gdb list of basic commands:
Example:
1 Create a source file vi swap.cc
source files as follows :
#include
using namespace std;
void swap(int &a,int &b)
{
int tmp;
tmp=a;
a=b;
b=tmp;
}
int main( )
{
int i,j;
cout
cin》i》》j;
cout "Before swap(),i=”"
3.Start debugging gdb swap
Previous1234Next page Total 4 pages
Many people are familiar with Ubuntu shared file box Windows shared files, and know
There are many commands on Linux systems that allow users to create new directories
The fstab file is mainly used to describe the information of various file systems in the system. If
Linux users in the process of using, sometimes encountered Fatal error, run database recovery and ot
What is optimized for Linux kernel 4.2?
Linux system how to use the crond command
How to modify the file time of the Linux system
Red Flag Linux6.0 system supports Ntfs partitioning skills
How to install and use Vsftp in Centos system
After CentOS installs vnc, prompts Could not start Xvnc?
Linux using the mpstat command method
Linux settings wget download http /https proxy method
Essential skills for Linux end users
How to remove the plus sign after the Linux Kernel version number?
Linux how to use the command to update the file directory time
Microsoft Windows Phone Dev Center Update
New toolbar for Windows 8 simulates "Start Menu"
Win10 preview version 9860 update content 19 questions and answers ultimate summary
Windows 7 SP1 can not be installed 100% solution
How to quickly view the purchase record of Windows Store on Win10?
Win7 system sharing wireless wifi prompt error 1203 how to do
Windows 8 adjusts the size of the Recycle Bin