ITADN

Crash command: bpf: add -p, -P, -m, -M, -s, -x, and -d

#582Openosandov 创建于 2025-12-16
O
osandovcommented
https://crash-utility.github.io/help_pages/bpf.html Now that we have the basic command with no options implemented, we should support the various options. `-p ID` gives more details about the BPF program with the given ID. We'll want a `bpf_prog_by_id()` helper for that based on the kernel function with the same name. `-P` gives more details for every BPF program. `-m ID` gives more details about the BPF map with the given ID. We'll want a `bpf_map_by_id()` helper for that. There's no equivalent kernel function, but `bpf_map_get_fd_by_id()` is similar. `-M` gives more details for every BPF map. `-s` dumps the raw data structures. `-x` and `-d` control the output format for `-s`. We have several commands that have the same flags; search for `_object_format_options()` for examples.
1 条评论