freebsd-dev/sys/ddb
John Baldwin 884eaacd24 ddb: Rework macros to make it easier to add new command tables.
- Add new DB_DEFINE_TABLE and DB_DECLARE_TABLE macros to define new
  command tables.  DB_DECLARE_TABLE is intended for use in headers
  similar to MALLOC_DECLARE and SYSCTL_DECL.

  DB_DEFINE_TABLE takes three arguments, the name of the parent table,
  the command name, and the name of the table itself, e.g.
  DB_DEFINE_TABLE(show, foo, show_foo) defines a new "show foo" table.

- DB_TABLE_COMMAND, DB_TABLE_COMMAND_FLAGS, DB_TABLE_ALIAS, and
  DB_ALIAS_FLAGS allow new commands and aliases to be defined.  These
  are similar to the existing DB_COMMAND, etc. except that they take
  an initial argument giving the name of the parent table, e.g.:

  DB_TABLE_COMMAND(show_foo, bar, db_show_foo_bar)

  defines a new "show foo bar" command.

This provides a cleaner interface than the ad-hoc use of internal
macros like _DB_SET that was required previously (e.g. in cxgbe(4)).

This retires DB_FUNC macro as well as the internal _DB_FUNC macro.

Reviewed by:	melifaro, kib, markj
Differential Revision:	https://reviews.freebsd.org/D40819
2023-07-05 16:02:01 -07:00
..
db_access.c sys/ddb: Use C99 fixed-width integer types. 2021-12-28 09:41:47 -08:00
db_access.h
db_break.c ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
db_break.h ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
db_capture.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
db_command.c ddb: have 'reset' command use normal reboot path 2023-01-23 15:10:24 -04:00
db_command.h
db_examine.c
db_expr.c fix style nit: space after if 2021-05-05 15:26:09 -06:00
db_input.c ddb: ansify 2023-02-08 00:09:23 +00:00
db_lex.c Adjust db_flush_line() definition to avoid clang 15 warning 2022-07-19 20:37:15 +02:00
db_lex.h
db_main.c
db_output.c ddb: enable the use of ^C and ^S/^Q 2021-03-14 16:04:27 -07:00
db_output.h
db_print.c ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
db_ps.c Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h 2023-02-02 00:59:26 +02:00
db_run.c ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
db_script.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
db_sym.c ddb: print the actual syscall name 2022-10-28 18:21:08 -03:00
db_sym.h ddb: print the actual syscall name 2022-10-28 18:21:08 -03:00
db_textdump.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
db_thread.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
db_variables.c
db_variables.h
db_watch.c ddb: annotate some commands with DB_CMD_MEMSAFE 2022-07-18 22:06:09 +00:00
db_watch.h
db_write_cmd.c
ddb.h ddb: Rework macros to make it easier to add new command tables. 2023-07-05 16:02:01 -07:00