Introduction to gdb Debugging Methods (1)

Introduction to gdb Debugging Methods (1)

gdb is a commonly used debugging tool in the workplace. A friend suggested that I introduce the usage of gdb, and after some thought, I decided to organize my own experiences with gdb into a series. This serves both to reinforce my foundational knowledge and to share some of my experiences and techniques. References All … Read more

GDB Debugging Methods (2) – Ptrace

GDB Debugging Methods (2) - Ptrace

GDB uses the ptrace system call to implement its functionality. This article provides a brief overview of ptrace. Ptrace The ptrace system call /* kernel/ptrace.c */ #define __NR_ptrace 117 __SYSCALL(__NR_ptrace, sys_ptrace) When using ptrace, you need to include<span>/sys/ptrace.h</span>. When calling the ptrace system call, you need to send requests based on different requests, which are … Read more

C++ Notes: A Beginner’s Guide to Debugging Segmentation Faults

C++ Notes: A Beginner's Guide to Debugging Segmentation Faults

Segmentation faults are like “invisible killers” in the programming world, often striking you when you least expect it. 📋 Article Overview Segmentation Fault is one of the most common and frustrating runtime errors in C++ development. This article will start with basic debugging techniques to help beginners quickly master the identification and resolution of segmentation … Read more

Writing a GDB Plugin for Quick Address Information Calculation

Writing a GDB Plugin for Quick Address Information Calculation

0x00 Background As a blank binary slate, there are times when we need to check various information about certain addresses. For example: Which segment does this address belong to? <span>.bss</span> or <span>.data</span>? Is a certain value on the heap or the stack? What is the corresponding address in IDA/Ghidra? Which mapping file does this address … Read more

Debugging the Linux Kernel Using QEMU and GDB

Debugging the Linux Kernel Using QEMU and GDB

Debugging the Linux kernel is an important way to understand the internal workings of an operating system. Often, code is understood through execution rather than just reading. By using QEMU in conjunction with the GDB debugger, we can set breakpoints, step through code, and inspect various data structures within the Linux kernel without needing additional … Read more

Understanding Essential Skills for C Programming – GDB Debugging

Understanding Essential Skills for C Programming - GDB Debugging

Recommended reading: C Language Learning Guide: Have you mastered these core knowledge points? C Language Pointers: From Beginner to Proficiency, a comprehensive article to thoroughly understand C Language Dynamic Memory Management: From Beginner to Proficiency, a comprehensive article to thoroughly understand C Language File Operations: From Beginner to Proficiency, a comprehensive article to thoroughly understand … Read more

Using Telink Microelectronics JTAG Tools (Part 2)

Using Telink Microelectronics JTAG Tools (Part 2)

Following the previous article introducing the “Using Telink Microelectronics JTAG Tools (Part 1)”, this article will continue to introduce the usage of JTAG related tool command lines and common problems along with their solutions. 1 Common GDB Commands During normal debugging, you can set breakpoints in Telink IOT Studio for debugging. When the breakpoint is … Read more

Linux C++ Programming: A Detailed Tutorial on Using Shell + GDB to Diagnose Deadlocks

Linux C++ Programming: A Detailed Tutorial on Using Shell + GDB to Diagnose Deadlocks

1. Introduction In the process of writing projects, multithreading is often involved. Programming multithreaded applications usually involves issues of thread safety, which is why mutexes are often used to ensure thread safety. However, the use of mutexes can often lead to another problem: deadlocks. A deadlock, simply put, occurs when there are two shared resources, … Read more

GDB Debugging Postgres Kernel (Postmaster + Backend + Client DQL/DML Handling)

GDB Debugging Postgres Kernel (Postmaster + Backend + Client DQL/DML Handling)

Click on the “Kernel Path“, select “Top/Star Public Account“ Valuable Benefits, Delivered First-Hand! 1. GDB Debugging Postgres Kernel GDB debugging of the Postgres kernel can generally be divided into three main categories. Debugging the initialization process of the Postgres kernel postmaster daemon Debugging the initialization implementation of the Postgres kernel backend process Debugging the implementation … Read more

Deep Dive into Linux: Master GDB for Instant Process Debugging!

Deep Dive into Linux: Master GDB for Instant Process Debugging!

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇 Join the technical exchange QQ group with 1000 members, remark 【Official Account】 for faster approval Common Usage Start: gdb File Exit: ctrl + d or quit debugging command These are the two files you need to use. Execute to generate the myexe file, … Read more