DB_COMMAND man page on PC-BSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
PC-BSD logo
[printable version]

DB_COMMAND(9)		 BSD Kernel Developer's Manual		 DB_COMMAND(9)

NAME
     DB_COMMAND, DB_SHOW_COMMAND, DB_SHOW_ALL_COMMAND — Extends the ddb com‐
     mand set.

SYNOPSIS
     #include <ddb/ddb.h>

     DB_COMMAND(command_name, command_function);

     DB_SHOW_COMMAND(command_name, command_function);

     DB_SHOW_ALL_COMMAND(command_name, command_function);

DESCRIPTION
     The DB_COMMAND() macro adds command_name to the list of top-level com‐
     mands.  Invoking command_name from ddb will call command_function.

     The DB_SHOW_COMMAND() and DB_SHOW_ALL_COMMAND() are roughly equivalent to
     DB_COMMAND() but in these cases, command_name is a sub-command of the ddb
     show command and show all command, respectively.

     The general command syntax: command[/modifier] address[,count], trans‐
     lates into the following parameters for command_function:

     addr	   The address passed to the command as an argument.

     have_addr	   A boolean value that is true if the addr field is valid.

     count	   The number of quad words starting at offset addr that the
		   command must process.

     modif	   A pointer to the string of modifiers. That is, a series of
		   symbols used to pass some options to the command. For exam‐
		   ple, the examine command will display words in decimal form
		   if it is passed the modifier "d".

EXAMPLE
     In your module, the command is declared as:

     DB_COMMAND(mycmd, my_cmd_func)
     {
	     if (have_addr)
		     db_printf("Calling my command with address %p\n", addr);
     }

     Then, when in ddb:

     db> mycmd 0x1000
     Calling my command with address 0x1000
     db>

SEE ALSO
     ddb(4)

AUTHOR
     This manual page was written by Guillaume Ballet ⟨gballet@gmail.com⟩.

BSD				August 27, 2008				   BSD
[top]

List of man pages available for PC-BSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net