
Debug CUDA Kernels Step by Step With cuda-gdb
Build with -g -G, set breakpoints inside a kernel, switch focus between blocks and threads, inspect variables and use conditional breakpoints with cuda-gdb.
Everything you need to level up your coding skills.

Build with -g -G, set breakpoints inside a kernel, switch focus between blocks and threads, inspect variables and use conditional breakpoints with cuda-gdb.

Trace a whole process tree with strace -f on Linux: read the pid prefix, split output per process with -ff -o, and follow threads that do the real work.

Send Zephyr printk and log output to a UART terminal or to SEGGER RTT, with the exact Kconfig lines, the chosen node and what to do when nothing prints.

Run compute-sanitizer with memcheck, racecheck, initcheck and synccheck to catch out-of-bounds accesses, shared memory races, leaks and uninitialized reads.

Cut strace 6.8 output to the system calls that matter using -e trace= with call names, class sets like %file and %network, negation, regexes and status=failed.

Build a DBG macro in C23 with GCC 14 that prefixes every debug line with __FILE__, __LINE__ and __func__, writes to stderr and compiles away in release builds.

A working method for Linux 6.12 kernel bugs: debug builds, reading oopses, runtime checkers, tracing, gdb in QEMU, hangs, and capturing crashes with kdump.

Use ltrace 0.7.3 on Linux to print the shared library calls a program makes, such as malloc and strcpy, with arguments and return values, and filter with -e.

Attach strace -p to a process that is already running on Linux, fix the Yama ptrace_scope permission error, watch a stuck call, then detach without killing it.

Fuzz C and C++ with libFuzzer and AFL++ on Clang 19: write targets, use sanitizers, build corpora and dictionaries, triage crashes and run fuzzing in CI.

A full guide to LLDB: its command grammar, breakpoints, stepping, variables, memory, watchpoints, core files, Python, remote debugging and macOS specifics.

A full guide to GDB for C and C++: building for debugging, crashes, wrong answers, hangs, corruption, threads, core files, remote targets and habits.
We send one email when a new post is published. No spam.