| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: db_command.h,v 1.39 2020/10/30 06:57:08 skrll Exp $ */ | | 1 | /* $NetBSD: db_command.h,v 1.40 2020/10/30 06:59:43 skrll Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Adam Hamsik. | | 8 | * by Adam Hamsik. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -116,40 +116,40 @@ struct db_command { | | | @@ -116,40 +116,40 @@ struct db_command { |
116 | * Flag is used for modifing command behaviour. | | 116 | * Flag is used for modifing command behaviour. |
117 | * CS_OWN && CS_MORE are specify type of command arguments. | | 117 | * CS_OWN && CS_MORE are specify type of command arguments. |
118 | * CS_OWN commandmanage arguments in own way. | | 118 | * CS_OWN commandmanage arguments in own way. |
119 | * CS_MORE db_command() prepare argument list. | | 119 | * CS_MORE db_command() prepare argument list. |
120 | * | | 120 | * |
121 | * CS_COMPAT is set for all level 2 commands with level 3 childs (show all pages) | | 121 | * CS_COMPAT is set for all level 2 commands with level 3 childs (show all pages) |
122 | * | | 122 | * |
123 | * CS_SHOW identify show command in BASE command list | | 123 | * CS_SHOW identify show command in BASE command list |
124 | * CS_MACH identify mach command in BASE command list | | 124 | * CS_MACH identify mach command in BASE command list |
125 | * | | 125 | * |
126 | * CS_SET_DOT specify if this command is put to last added command memory. | | 126 | * CS_SET_DOT specify if this command is put to last added command memory. |
127 | * CS_NOREPEAT this command does not repeat | | 127 | * CS_NOREPEAT this command does not repeat |
128 | */ | | 128 | */ |
129 | uint16_t flag; /* extra info: */ | | 129 | uint16_t flag; /* extra info: */ |
130 | #define CS_OWN 0x1 /* non-standard syntax */ | | 130 | #define CS_OWN 0x1 /* non-standard syntax */ |
131 | #define CS_MORE 0x2 /* standard syntax, but may have other | | 131 | #define CS_MORE 0x2 /* standard syntax, but may have other |
132 | words at end */ | | 132 | words at end */ |
133 | #define CS_COMPAT 0x4 /* is set for compatibilty with old | | 133 | #define CS_COMPAT 0x4 /* is set for compatibilty with old |
134 | ddb versions*/ | | 134 | ddb versions */ |
135 | #define CS_SHOW 0x8 /* select show list */ | | 135 | #define CS_SHOW 0x8 /* select show list */ |
136 | #define CS_MACH 0x10 /* select machine dependent list */ | | 136 | #define CS_MACH 0x10 /* select machine dependent list */ |
137 | | | 137 | |
138 | #define CS_SET_DOT 0x100 /* set dot after command */ | | 138 | #define CS_SET_DOT 0x100 /* set dot after command */ |
139 | #define CS_NOREPEAT 0x200 /* don't set last_command */ | | 139 | #define CS_NOREPEAT 0x200 /* don't set last_command */ |
140 | #ifdef DDB_VERBOSE_HELP | | 140 | #ifdef DDB_VERBOSE_HELP |
141 | const char *cmd_descr; /* description of command */ | | 141 | const char *cmd_descr; /* description of command */ |
142 | const char *cmd_arg; /* command arguments */ | | 142 | const char *cmd_arg; /* command arguments */ |
143 | const char *cmd_arg_help; /* arguments description */ | | 143 | const char *cmd_arg_help; /* arguments description */ |
144 | #endif | | 144 | #endif |
145 | }; | | 145 | }; |
146 | | | 146 | |
147 | void *db_alloc(size_t); | | 147 | void *db_alloc(size_t); |
148 | void *db_zalloc(size_t); | | 148 | void *db_zalloc(size_t); |
149 | void db_free(void *, size_t); | | 149 | void db_free(void *, size_t); |
150 | | | 150 | |
151 | #ifndef _KERNEL | | 151 | #ifndef _KERNEL |
152 | #define db_kernelonly() \ | | 152 | #define db_kernelonly() \ |
153 | db_printf("%s: can only be used in-kernel.\n", __func__) | | 153 | db_printf("%s: can only be used in-kernel.\n", __func__) |
154 | #endif | | 154 | #endif |
155 | | | 155 | |