A simple tutorial on using the Linux debugging tool GDB
This article is mainly a tutorial on the use of GDB, a Linux debugging tool, as follows.
Disclaimer: the content of this blog is sorted out by myself through the course of the experimental building.
Related concepts of GDB
GDB, which is the abbreviation of The GNU Project Debugger, is a fully functional debugging tool under Linux. GDB supports debugging methods such as breakpoints, stepping, printing variables, observing variables, looking at registers, checking stacks, and so on. In Linux environment software development, GDB is the main debugging tool, which is used to debug C and C++ programs.
Related operations of GDB
Here is a program with buging.c:
[yqtao@localhost linux] $cat buging.c # include int getSum (int n) {int sum=0,i; for