git: 53021bbf8255 - stable/13 - ddb: add _FLAGS command variants

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 11 Aug 2022 14:32:50 UTC
The branch stable/13 has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=53021bbf8255f57a422f9874a108d4a679b180a2

commit 53021bbf8255f57a422f9874a108d4a679b180a2
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2022-06-30 15:58:22 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-08-11 14:22:57 +0000

    ddb: add _FLAGS command variants
    
    Provide _FLAGS variants of the various command definition macros, in
    anticipation of adding a new flag. This can also be used for some
    existing commands which require special flag values.
    
    Reviewed by:    markj
    MFC after:      3 days
    Sponsored by:   Juniper Networks, Inc.
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D35581
    
    (cherry picked from commit 7ce58d4e8c0cfcb42ec404aed6185b5eb7eef8a8)
---
 sys/ddb/ddb.h | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 3bd049de422b..ea634ae55bf8 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -164,14 +164,22 @@ _func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
 #define	DB_FUNC(_name, _func, list, _flag, _more)		\
 	_DB_FUNC(_cmd, _name, _func, list, _flag, _more)
 
+#define	DB_COMMAND_FLAGS(cmd_name, func_name, flags) \
+	_DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, flags, NULL)
 #define	DB_COMMAND(cmd_name, func_name) \
-	_DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL)
+	DB_COMMAND_FLAGS(cmd_name, func_name, 0)
+#define	DB_ALIAS_FLAGS(alias_name, func_name, flags) \
+	_DB_SET(_cmd, alias_name, func_name, db_cmd_table, flags, NULL)
 #define	DB_ALIAS(alias_name, func_name) \
-	_DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL)
+	DB_ALIAS_FLAGS(alias_name, func_name, 0)
+#define	DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, flags) \
+	_DB_FUNC(_show, cmd_name, func_name, db_show_table, flags, NULL)
 #define	DB_SHOW_COMMAND(cmd_name, func_name) \
-	_DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL)
+	DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, 0)
+#define	DB_SHOW_ALIAS_FLAGS(alias_name, func_name, flags) \
+	_DB_SET(_show, alias_name, func_name, db_show_table, flags, NULL)
 #define	DB_SHOW_ALIAS(alias_name, func_name) \
-	_DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL)
+	DB_SHOW_ALIAS_FLAGS(alias_name, func_name, 0)
 #define	DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
 	_DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL)
 #define	DB_SHOW_ALL_ALIAS(alias_name, func_name) \