Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Jdb_module::Cmd Struct Reference

A Jdb command description. More...

#include <jdb_module.h>

List of all members.

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.


Detailed Description

A Jdb command description.

A Jdb_module provides an array of such Cmd structures, where each structure describes one command.


Member Data Documentation

void* Jdb_module::Cmd::argbuf
 

The buffer for the read arguments.

This buffer is used to store the data read via the format description (see Cmd::fmt).

char const* Jdb_module::Cmd::cmd
 

The normal (long) command.

char const* Jdb_module::Cmd::descr
 

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.

char const* Jdb_module::Cmd::fmt
 

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:
A format descriptor always starts with %; the % may be followed by an unsigned decimal number (len argument) which specifies the maximum number of characters to read. The integer formats ('d', 'i', 'o', 'u', 'X', and 'x') may be prefixed with one or two 'l's, for reading "long int" or "long long int".

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.

  • '%' print the "\%" character
  • 'i' read an integer (optionally as hexadecimal number, if it starts with "0x" or as octal number, if it starts with "0")
  • 'p' read a pointer in hexadecimal format ('void*' buffer)
  • 'o' read an octal integer
  • 'X', 'x' read a hexadecimal integer
  • 'd' read a decimal (optionally signed) integer
  • 'u' read a decimal unsigned integer
  • 'c' read a character and continue immediately ('char' buffer)
  • 's' read a string (the len argument must be given) ('char[len]' buffer)

int Jdb_module::Cmd::id
 

The unique ID of the command within the module.

This ID is handed to action().

char const* Jdb_module::Cmd::scmd
 

The short command.


The documentation for this struct was generated from the following file:
Generated on Mon Sep 26 14:20:15 2005 for Fiasco by  doxygen 1.4.2