Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

db_command(9) [freebsd man page]

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

NAME
DB_COMMAND, DB_SHOW_COMMAND, DB_SHOW_ALL_COMMAND -- Extends the ddb command 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 commands. 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], translates 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 example, 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 ", addr); } Then, when in ddb: db> mycmd 0x1000 Calling my command with address 0x1000 db> SEE ALSO
ddb(4) AUTHORS
This manual page was written by Guillaume Ballet <gballet@gmail.com>. BSD
August 27, 2008 BSD

Check Out this Related Man Page

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

NAME
DB_COMMAND, DB_SHOW_COMMAND, DB_SHOW_ALL_COMMAND -- Extends the ddb command 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 commands. 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], translates 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 example, 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 ", addr); } Then, when in ddb: db> mycmd 0x1000 Calling my command with address 0x1000 db> SEE ALSO
ddb(4) AUTHORS
This manual page was written by Guillaume Ballet <gballet@gmail.com>. BSD
August 27, 2008 BSD
Man Page

4 More Discussions You Might Find Interesting

1. AIX

AIX 5.3 , gensyms command, translate 32 bit addr to 64 bit addr

I am trying to map the information from the gensyms command, Its gives information about the various symbols info like symbol type, addr offset, and the main libraries addr starting point. My problem is , how do I map this 32 bit addr to a 64 bit addr, I am trying to extract Segment # information... (0 Replies)
Discussion started by: mrmeswani
0 Replies

2. Shell Programming and Scripting

How to build a command into a string rather than execute the command

I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example: mycmd='' if ...; then $mycmd='sudo ' fi $mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile res=`$mycmd` (I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies

3. Shell Programming and Scripting

Help needed passing string to command

hi to all code: </div> command... "command_name arg1 arg2 option=xxxxx" example --- useradd username group=xxxxxx. </div> when someone ran this command it point to some other script (say script1), mean post execution of command. in the script1 i need only "xxxxx" value. then i... (5 Replies)
Discussion started by: honeym210
5 Replies

4. Shell Programming and Scripting

incremental addition of hex decimal number in one field

Hi I want to incremental add hex decimal number to a particula field in file eg: addr =123 dept1=0 addr = 345 dept2 =1 addr2 = 124 dept3 =2 . . . . . . addr3 =567 dept15 =f Is there any command which add... (8 Replies)
Discussion started by: diddi_linux
8 Replies