---
name: "DB_SHOW_ALL_COMMAND"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/DB_COMMAND/9freebsd"
---

# DB\_SHOW\_ALL\_COMMAND(9freebsd)

Extends the ddb command set

Part of [DB\_COMMAND(9freebsd)](/DB_COMMAND/9freebsd.md).

## 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\n", addr);
}
```

Then, when in ddb:

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

## SEE ALSO

[ddb(4)](/ddb/4.md)

## AUTHORS

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