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

CMake Tutorial: Supporting GDB Debugging

CMake Tutorial: Supporting GDB Debugging

Table of Contents 1. Introduction 2. How to Support GDB Debugging 3. Code Examples [1] Write demo.c [2] Write CMakeLists.txt [3] Compile [4] GDB Debugging 1. Introduction The combination of CMake and GDB indeed makes the development work of C or C++ easier, enabling cross-platform project builds and source-level debugging. This article details how to … Read more

Transitioning from MCU to Embedded Linux Development

Transitioning from MCU to Embedded Linux Development

Follow and star our official account, to access exciting content Source: Zhihu Author: snowdream I saw the following question on Zhihu. After 6 years in MCU, how do I transition to Embedded Linux? It’s quite awkward now; the MCU products I work on always feel repetitive, and I want to learn something new but don’t … Read more

GDB Debugging and Common Commands in Embedded Linux

GDB Debugging and Common Commands in Embedded Linux

1. GDB Deployment Establishing GDB Debugging Connection: 1. Start GDB on the host, and start the server gdbserver on the target board. 2. Ensure that the compiled options for the program being debugged include the -g option to add debugging information, and that the debugging programs on both the host and target board are consistent. … Read more