Comprehensive Guide to Linux Program Development and Debugging: Master These Debugging Techniques to Make Your Programs Soar

Comprehensive Guide to Linux Program Development and Debugging: Master These Debugging Techniques to Make Your Programs Soar

🔥 This article is worth: saving you 80% of your debugging time, from beginner to expert, all in one article for Linux program debugging! Debugging is a core skill that every programmer must master when developing programs in a Linux environment. However, many students only know how to use <span>printf</span> and are at a loss … Read more

Debugging with arm-none-eabi-gdb in Ubuntu

Debugging with arm-none-eabi-gdb in Ubuntu

【Trust me: Developing with Ubuntu absolutely provides a professional experience and gives others the impression of expertise】 In this article, we will look at the process of debugging with gdb. 1. Environment Preparation: Target System: STM32F407 Environmental Control Board, Host Machine: Ubuntu + VSCode + arm-none-eabi-gdb + OpenOCD + ST-Link 2. Using arm-none-eabi-gdb 1. Create … Read more

Linux | Porting i.MX6ULL Gdb+Gdbserver Debugging (Chapter 14)

Linux | Porting i.MX6ULL Gdb+Gdbserver Debugging (Chapter 14)

01 Many friends are transitioning from microcontrollers, where they are accustomed to using JLINK for debugging programs, and find it quite unfamiliar to switch to Linux.Indeed, it would be great if we could set breakpoints, perform single-step debugging, and inspect variables on Linux. Next, I will teach you how to debug application code on an … Read more

Advanced GDB Debugging Techniques

Advanced GDB Debugging Techniques

Installing GDB sudo apt-get install gdb Common Debugging Commands Command Name Command Abbreviation Command Description run r Run the program continue c Continue running the program break b Set a breakpoint tbreak tb Set a temporary breakpoint delete del Delete a breakpoint enable \ Enable a breakpoint disable \ Disable a breakpoint info \ View … Read more

Debugging the Linux Kernel with QEMU and GDB

Debugging the Linux Kernel with QEMU and GDB

Environment Preparation Environment openEuler 24.03-LTS Installing QEMU yum install -y qemu-system-x86_64 qemu Creating the File System # Format the file system dd if=/dev/zero of=myrootfs.img bs=1M count=4096 mkfs.ext4 myrootfs.img # Install packages mkdir rootfs mount myrootfs.img rootfs/ dnf –installroot=$(pwd)/rootfs install systemd passwd Compiling the Kernel # Download the openEuler kernel source package yumdownloader –source kernel # … Read more

Displaying C++ STL Data Contents During GDB Debugging

Displaying C++ STL Data Contents During GDB Debugging

In a relatively underperforming Linux system, using gdb to print a C++ list does not yield effective display of data members: The gdb wiki mentions: https://sourceware.org/gdb/wiki/STLSupport This means that starting from gdb 7.0, support for pretty-printers implemented in Python has been added. There is an implementation of pretty-printers in libstdc++, and some distributions have integrated … Read more

Debugging Methods and Techniques for ATF Architecture 3.4 (GDB, JTAG, Logging System)

Debugging Methods and Techniques for ATF Architecture 3.4 (GDB, JTAG, Logging System)

Table of Contents 3.4.1 Overview of Debugging 3.4.2 GDB Debugging Methods Basic Configuration Multi-Stage Debugging Techniques Common Issues Handling 3.4.3 Practical JTAG Debugging Hardware Connection Configuration Key Debugging Scenarios 3.4.4 Using the Logging System TF-A Logging Framework Log Output Configuration Advanced Debugging Techniques 3.4.5 Typical Debugging Cases Case 1: BL2 Image Load Failure Case 2: … Read more

Cross-Compiling GDB Tool for Allwinner T113

Cross-Compiling GDB Tool for Allwinner T113

Cross-Compiling GDB Tool The Allwinner T113 is a processor designed for embedded applications, belonging to Allwinner Technology’s T series product line. This chip features a dual-core Cortex-A7 CPU architecture, with a clock speed of up to 1.2GHz, integrates an ARM Mali400 MP2 GPU, and supports 1080p video encoding and decoding, making it suitable for low-power … Read more

Getting Started with BRPC through GDB – An Introductory Guide

Getting Started with BRPC through GDB - An Introductory Guide

Introduction In today’s world of increasingly large software, with codebases ranging from tens of thousands to tens of millions of lines, quickly getting up to speed and understanding the business context is no easy task. By constructing relevant business scenarios and examining the internal state of the program, one can gain insights into the macro … Read more

GDB Debugging Techniques: Multithreading Case Analysis (Beginner’s Guide)

GDB Debugging Techniques: Multithreading Case Analysis (Beginner's Guide)

In the complex world of software development, efficient debugging tools are key instruments for problem-solving. Today, we will delve into the powerful debugging tool — GDB (GNU Debugger). GDB provides developers with an effective way to explore the internal workings of programs, find errors, and optimize performance. Let us embark on a debugging journey with … Read more