When the Kernel Writes Its Own Code: Debugging Runtime-Generated...
summary
Shows how to debug runtime‑generated kernel code (eBPF JIT, ftrace/kprobe trampolines) by adapting GDB and running the kernel under QEMU so the emulator acts as a vmlinux+QEMU debug server. Demonstrates concrete tools: custom GDB scripts (example: dump_kasan_shadow), TUI layouts and Python panes, and a breakpoint hook that captures the JITed x86 buffer for a named BPF program. The demo eventually catches and single‑steps the generated instructions, proving the approach works end to end.
AI-written summary · about
