#include <jdb_module.h>
Public Attributes | |
int | id |
The unique ID of the command within the module. | |
char const * | scmd |
The short command. | |
char const * | cmd |
The normal (long) command. | |
char const * | fmt |
The command format (possible options). | |
char const * | descr |
The description of the command. | |
void * | argbuf |
The buffer for the read arguments. |
A Jdb_module provides an array of such Cmd structures, where each structure describes one command.
|
The buffer for the read arguments. This buffer is used to store the data read via the format description (see Cmd::fmt). |
|
The normal (long) command.
|
|
The description of the command. The description of a command must contain the command syntax itself and followed by "\\t" the description. If more than one line is needed "\\n" can be used to switch to a new line and "\\t" again to align the description. |
|
The command format (possible options). This format string is somewhat like a "scanf" format. It may contain normal text interleaved with input format descriptions (like %c). After the Jdb core recognized the command the format string is printed up to the first format descriptor, then input according to the given format is requested, after this input the procedure is repeated until there are no more format descriptors and action() is called. The values read via the format input are stored into Cmd::argbuf, which must provide enough space for storing all the data according to the whole format string.
Format descriptors: The integer read formats require an int, long int, or long long int sized buffer according to the number of 'l' modifiers; for the others see the respective format description.
|
|
The unique ID of the command within the module. This ID is handed to action(). |
|
The short command.
|