GDB Command Summary

GDB Command Summary

1. Start gdb -q: Suppress unnecessary output. file a.out: Specify the debug file. gdb –args a.out a.txt: Specify arguments. set args a.txt: Specify arguments after starting gdb. run a.txt: Run with specified arguments. start a.txt: Start with specified arguments (break at main). cd $dir; path $dir: Specify environment variables. run > a.txt: Redirect output to … Read more

Exploring the Powerful Features of GDB

Exploring the Powerful Features of GDB

Follow+Star Public Account, don’t miss the wonderful content Source | Zhihu Wei Yixiao Embedded development cannot be separated from debugging tools, and there are many debugging tools on the market, but in terms of compatibility and versatility, GDB absolutely holds a leading advantage. Today, let’s talk about this powerful GDB tool. Naked Running State: The … Read more

GDB Debugger Made Simple: A Step-by-Step Guide

GDB Debugger Made Simple: A Step-by-Step Guide

Introduction to GDB GDB (GNU Debugger) is a powerful command-line debugging tool. Generally, when developing on Windows, command-line debugging is rarely used, as debuggers are mostly integrated with compilers in IDEs. Of course, you can also directly use gcc and gdb to compile and debug our C programs on Windows. For example, MinGW (a collection … Read more

GDB Usage Summary

GDB Usage Summary

From WeChat Official Account: Embedded and Linux Matters Starting To start gdb, simply type the gdb command in the shell. After starting, it will display the following information and show the gdb prompt. ➜ example gdb GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or … Read more

Commonly Used GDB Commands Overview

Commonly Used GDB Commands Overview

This article is compiled from “Debugging with GDB: the GNU Source-Level Debugger for GDB (GDB)” — Fsf Article Navigation ◈ Table of Contents00% ◈ break11% ◈ info breakpoints18% ◈ disable20% ◈ enable22% ◈ clear26% ◈ delete30% ◈ tbreak32% ◈ watch33% ◈ step36% ◈ reverse-step40% ◈ next42% ◈ reverse-next44% ◈ return46% ◈ finish48% ◈ until50% ◈ … Read more

How to Call Functions from GDB

How to Call Functions from GDB

(Click the public account above, follow quickly) Compiled by: Linux China / Lv Feng, English: Julia Evans https://linux.cn/article-9588-1.html This week, I discovered that I could call C functions from gdb. This seemed cool because I previously thought that gdb was just a read-only debugging tool at best. I was surprised that gdb could call functions. … Read more

Simple Usage of Makefile and GDB

Simple Usage of Makefile and GDB

1. Why Use Makefile for Compiling Multiple .C Files: (1). Generally, when we are developing a project, we will create a project with many directories, and each directory contains many .C files, which requires joint compilation. (2). If we compile manually, the multiple program files are intertwined, leading to dependencies and dependent relationships between different … Read more

Debugging ARM64 Kernel with DS-5 Community Edition

Debugging ARM64 Kernel with DS-5 Community Edition

In Chapter 3 of “Running Beginner’s Guide,” Ben Shu introduced the method of step-by-step debugging the kernel using Eclipse + QEMU. With the kernel compiled using Ben Shu’s unique O0 option, you can freely explore the kernel. Today, Ben Shu will introduce the IDE debugging tool developed by ARM: DS-5. DS-5 is a secondary development … Read more

System Testing AC5, AC6, IAR and GCC Debugging Effects

System Testing AC5, AC6, IAR and GCC Debugging Effects

First of all, I would like to thank everyone for their feedback on the last video. It was a very meaningful discussion. The performance of AC6 this time is astonishing; it can jump around even without optimization. 【Experiment Purpose】 The purpose is to test the debugging phenomena in the C environment with the same program … Read more