Get the App
SLTechnology News&Howtos  ›  Servers  › 

A simple tutorial on using the Linux debugging tool GDB

Shulou Source: shulou.com Published: 2022-06-02 00:47:35 10月03日 Update

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

Tags: Breakpoints functions programs representatives tools information tutorials parameters variables commands content friends source code or support simple one line no code interest Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS OPPO Reno Huawei Shulou Information Microsoft