scripts/gdb/radix-tree: add lx-radix-tree-command
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 6 Nov 2025 12:43:41 +0000 (13:43 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 20 Nov 2025 22:03:42 +0000 (14:03 -0800)
commitcaa71919a622e3f7d290d4f17ae538b15f5cb6d3
treeddf48ac5a1bdef0569261cad04a009f6824d7d3c
parentc9dddd981600538d8c39d58ba89679439231959f
scripts/gdb/radix-tree: add lx-radix-tree-command

Patch series "scripts/gdb/symbols: make BPF debug info available to GDB",
v2.

This series greatly simplifies debugging BPF progs when using QEMU gdbstub
by providing symbol names, sizes, and line numbers to GDB.

Patch 1 adds radix tree iteration, which is necessary for parsing
prog_idr.  Patch 2 is the actual implementation; its description contains
some details on how to use this.

This patch (of 2):

Add a function and a command to iterate over radix tree contents.
Duplicate the C implementation in Python, but drop support for tagging.

Link: https://lkml.kernel.org/r/20251106124600.86736-1-iii@linux.ibm.com
Link: https://lkml.kernel.org/r/20251106124600.86736-2-iii@linux.ibm.com
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkman <daniel@iogearbox.net>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/radixtree.py