Hands-On Linux Application Debugging with QEMU: Move Beyond printf Debugging (Learn Step by Step on Your PC Book 3)
English | October 12, 2026 | ASIN: B0HMRN2WVR | 196 Pages | Epub | 3.74 MB
Every time your application crashes with "Segmentation fault," do you add printf calls and rebuild?This book is an introduction to debugging applications on embedded Linux with tools such as gdb, core dumps, ASan, and strace. You need no real hardware. QEMU's ARM64 virt machine, running inside a single PC, stands in for the board: you run applications built on the host on the target, and debug them both on the target and from the host.Even when generative AI suggests "Get a core and look at the backtrace" or "Try building with ASan," you get stuck there if you have never used those tools. Once you have used them with your own hands in this book, you can run the tool on the spot and give the results back to the AI.Does this sound familiar?* Your only debugging experience is adding printf calls and rebuilding* Your application crashed with Segmentation fault, but you do not know which line it crashed on, so you add logging and wait for it to happen again* You tried to connect VS Code to the target, but when it does not connect, you do not know what to fix in launch.json* Generative AI suggested "look at the core" or "use ASan," but you have never used them* You want to try out debugging procedures, but you have no board on handThe applications in this book have bugs put in on purpose: out-of-bounds writes, use of freed memory, overlooked system call failures, locks taken in the wrong way, and more. You run each one on QEMU, see what happens, and then use the tools to find the line with the bug. The gdb sessions, ASan reports, and strace output shown are what was actually produced in that environment.Tools covered in this book* gdb on the target (stopping, stepping one line at a time, looking at variables, backtraces, watchpoints, attaching)* gdbserver, and gdb-multiarch on the host* VS Code (how the items in launch.json map to gdb commands)* Core dumps (read on the target and on the host)* Debugging multithreaded applications (info threads, thread apply all bt)* ASan and UBSan (out-of-bounds writes, use of freed memory, memory never freed, signed integer overflow)* strace (showing only the failed system calls)What you will be able to do* Stop an application, look at its variables, and get a backtrace, both on the target and from the host* When VS Code does not connect, replace the launch.json items with gdb commands and check which one is not taking effect* Keep the core dump of a crashed application and find which line it crashed on* In a multithreaded application that has stopped and does not move, find which thread is waiting for what* Find memory errors that do not cause a crash with ASan, and failed system calls with straceBetween the chapters are five exercises (with answers). By working out for yourself which tool to use and what to look at, you become able to use the methods you read about when you investigate real problems.The methods in this book are not limited to embedded systems; they work for Linux applications in general.Learning environment: Ubuntu 24.04 LTS on VMware Workstation Pro on a Windows PC, and QEMU's ARM64 virt machine (Linux kernel 6.6, BusyBox). No additional hardware is needed.By the time you finish, you will be able to use debugging tools to get information that printf logs cannot give you, and get closer to the cause of a problem.This is the third book in the "Learn Step by Step on Your PC" series.The series uses QEMU so that you can learn without real hardware.This book is organized so that you can follow it on its own, even if you have not read the earlier books.
Recommend Download Link Hight Speed | Please Say Thanks Keep Topic Live
ClicknUpload
ezq0c.7z
Rapidgator
ezq0c.7z.html
DDownload
ezq0c.7z
FreeDL
ezq0c.7z.html
KatFile
ezq0c.7z.html
Links are Interchangeable - Single Extraction