Skip to content

scripts/gdb/symbols: make BPF debug info available to GDB

Ilya Leoshkevich bpf lkml 2 versions – Applied

Status from this message: [merged mm-nonmm-stable] scripts-gdb-symbols-make-bpf-debug-info-available-to-gdb.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 6 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2scripts/gdb/radix-tree: add lx-radix-tree-commandscripts/gdb/linux/radixtree.py+132 -70 repliesApplied
2/2scripts/gdb/symbols: make BPF debug info available to GDBscripts/gdb/linux/bpf.py scripts/gdb/linux/constants.py.in scripts/gdb/linux/symbols.py+349 -120 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] scripts/gdb/symbols: make BPF debug info available to GDB

v1: https://lore.kernel.org/bpf/[email protected]/
v1 -> v2: Hide the feature behind the -bpf flag for performance reasons
(Jan).
Fix running lx-symbols twice.

Hi,

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.

Best regards,
Ilya

Ilya Leoshkevich (2):
scripts/gdb/radix-tree: add lx-radix-tree-command scripts/gdb/symbols: make BPF debug info available to GDB

 scripts/gdb/linux/bpf.py          | 253 ++++++++++++++++++++++++++++++
 scripts/gdb/linux/constants.py.in |   3 +
 scripts/gdb/linux/radixtree.py    | 139 +++++++++++++++-
 scripts/gdb/linux/symbols.py      | 105 +++++++++++--
 4 files changed, 481 insertions(+), 19 deletions(-)
 create mode 100644 scripts/gdb/linux/bpf.py
Signature · 1 line
2.51.1