HomeFreeBSD

ddb: Add CTF-based pretty printing

Description

ddb: Add CTF-based pretty printing

Add basic CTF support and a CTF-powered pretty-printer to ddb.

The db_ctf.* files expose a basic interface for fetching type
data for ELF symbols, interacting with the CTF string table,
and translating type identifiers to type data.

The db_pprint.c file uses those interfaces to implement
a pretty-printer for all kernel ELF symbols.
The pretty-printer works with symbol names and arbitrary addresses:
pprint struct thread 0xffffffff8194ad90

Pretty-printing currently only works after the root filesystem
gets mounted because the CTF info is not available during
early boot.

Differential Revision: https://reviews.freebsd.org/D37899
Approved by: markj (mentor)

Details

Provenance
bnovkovAuthored on Mar 22 2024, 3:01 AM
Differential Revision
D37899: ddb: Add basic CTF support [2/2]
Parents
rG312a05c39e5f: riscv: remove more riscv64sf support
Branches
Unknown
Tags
Unknown