freebsd-src/sys/ddb
Bojan Novković c21bc6f3c2 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)
2024-03-22 04:03:33 +01:00
..
db_access.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_access.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_break.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_break.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_capture.c ddb: Add sysctl flag CTLFLAG_TUN to loader tunable 2023-10-09 18:30:21 +08:00
db_command.c ddb: Add CTF-based pretty printing 2024-03-22 04:03:33 +01:00
db_command.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_ctf.c ddb: Add CTF-based pretty printing 2024-03-22 04:03:33 +01:00
db_ctf.h ddb: Add CTF-based pretty printing 2024-03-22 04:03:33 +01:00
db_examine.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_expr.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_input.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_lex.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_lex.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_main.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_output.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
db_output.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_pprint.c ddb: Add CTF-based pretty printing 2024-03-22 04:03:33 +01:00
db_print.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_ps.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
db_run.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_script.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_sym.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
db_sym.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_textdump.c ddb: Fix typo (triple S) 2023-12-27 20:24:31 -07:00
db_thread.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_variables.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_variables.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_watch.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
db_watch.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
db_write_cmd.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ddb.h ddb: Add CTF-based pretty printing 2024-03-22 04:03:33 +01:00