Extend kbox debugging and system analysis
Draft
KA
4mo ago+410+410+012345678901234567890123456789-0-0-0123456789
- Add conditional breakpoint framework for GDB
- Add ftrace buffer export mechanism
- Add drgn probing scripts for LKL kernel state
- Add .gitignore for trace artifacts and vendored deps
Summary by cubic
Adds LKL ftrace tracing (tracer and event modes) with CLI flags and host export, plus GDB and drgn helpers to make kernel debugging easier.
- New Features
- LKL ftrace tracer mode: enable with --ftrace=function|function_graph, optional --ftrace-filter=SYM, and export with --ftrace-dump=PATH. Mounts tracefs at /.kbox-tracing and clears the buffer before start.
- Event mode: enable tracepoints via --ftrace-events=cat/ev,... and write results to --ftrace-outdir (creates ftrace.log and start_ts aligned to LKL /proc/uptime).
- Lifecycle hooks: tracing is set up after boot and automatically dumped on shutdown or error paths.
- GDB helpers: scripts/gdb/kbox-events.py adds kbox-break-pid and kbox-break-openat for string/struct-aware conditional breakpoints.
- drgn helper: scripts/drgn/kbox_tasks.py lists LKL tasks (PID/COMM/STATE) for quick state inspection.